@@ -27,8 +27,8 @@ const issueLabelConfig = defineString("ISSUE_LABEL", {
2727 description : "Label for the Jira issues being created" ,
2828 default : "in-app" ,
2929} ) ;
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 " ,
3232 input : {
3333 text : {
3434 validationRegex :
@@ -37,8 +37,9 @@ const apiKeyOwnerConfig = defineString("API_KEY_OWNER", {
3737 } ,
3838 } ,
3939} ) ;
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" ,
4243} ) ;
4344
4445export const handleInAppFeedback = async ( event ) => {
@@ -50,15 +51,15 @@ export const handleInAppFeedback = async (event) => {
5051} ;
5152
5253export const feedbacktojira =
53- onInAppFeedbackPublished ( { secrets : [ apiKeyConfig ] } , handleInAppFeedback ) ;
54+ onInAppFeedbackPublished ( { secrets : [ apiTokenConfig ] } , handleInAppFeedback ) ;
5455
5556/**
5657 * Creates "Authorization" header value.
5758 * @return {string } Basic, base64-encoded "Authorization" header value
5859 */
5960function authHeader ( ) {
6061 return "Basic " + Buffer
61- . from ( apiKeyOwnerConfig . value ( ) + ":" + apiKeyConfig . value ( ) )
62+ . from ( apiTokenOwnerConfig . value ( ) + ":" + apiTokenConfig . value ( ) )
6263 . toString ( "base64" ) ;
6364}
6465
0 commit comments