@@ -27,8 +27,8 @@ const issueLabelConfig = defineString("ISSUE_LABEL", {
27
27
description : "Label for the Jira issues being created" ,
28
28
default : "in-app" ,
29
29
} ) ;
30
- const apiKeyOwnerConfig = defineString ( "API_KEY_OWNER " , {
31
- description : "Owner of the Jira API key " ,
30
+ const apiTokenOwnerConfig = defineString ( "API_TOKEN_OWNER " , {
31
+ description : "Owner of the Jira API token " ,
32
32
input : {
33
33
text : {
34
34
validationRegex :
@@ -37,8 +37,9 @@ const apiKeyOwnerConfig = defineString("API_KEY_OWNER", {
37
37
} ,
38
38
} ,
39
39
} ) ;
40
- const apiKeyConfig = defineSecret ( "API_KEY" , {
41
- description : "Jira API key" ,
40
+ const apiTokenConfig = defineSecret ( "API_TOKEN" , {
41
+ description : "Jira API token. Created using " +
42
+ "https://id.atlassian.com/manage-profile/security/api-tokens" ,
42
43
} ) ;
43
44
44
45
export const handleInAppFeedback = async ( event ) => {
@@ -50,15 +51,15 @@ export const handleInAppFeedback = async (event) => {
50
51
} ;
51
52
52
53
export const feedbacktojira =
53
- onInAppFeedbackPublished ( { secrets : [ apiKeyConfig ] } , handleInAppFeedback ) ;
54
+ onInAppFeedbackPublished ( { secrets : [ apiTokenConfig ] } , handleInAppFeedback ) ;
54
55
55
56
/**
56
57
* Creates "Authorization" header value.
57
58
* @return {string } Basic, base64-encoded "Authorization" header value
58
59
*/
59
60
function authHeader ( ) {
60
61
return "Basic " + Buffer
61
- . from ( apiKeyOwnerConfig . value ( ) + ":" + apiKeyConfig . value ( ) )
62
+ . from ( apiTokenOwnerConfig . value ( ) + ":" + apiTokenConfig . value ( ) )
62
63
. toString ( "base64" ) ;
63
64
}
64
65
0 commit comments