Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A GitHub Action to integrate multiple tools with Jira Server and raise relevant
|Parameter|Required|Default value|Description|
|:--:|:--:|:--:|:--:|
|JIRA_ON_CLOUD|false|false|If you are using Jira on Cloud set this environment variable to true|
|JIRA_CLOUD_TOKEN|false|N/A|Github secret for the JIRA basic authentication token. NOTE: Should be in base64|
|JIRA_CLOUD_TOKEN|false|N/A|Github secret for the JIRA basic authentication token.|
|JIRA_USER|false|N/A|GitHub secret for the JIRA user email for external access|
|JIRA_PASSWORD|false|N/A|GitHub secret for the JIRA API token for external access|
|JIRA_PROJECT|true|N/A|The project key for Jira|
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const logout = async (jiraAuthHeaderValue) => {

const kickOffAction = async (inputJson) => {
if (JIRA_CONFIG.JIRA_ON_CLOUD === 'true') {
jiraAuthHeaderValue = `Basic ${JIRA_CONFIG.JIRA_CLOUD_TOKEN}`;
const encodedAuthHeader = btoa(`${JIRA_CONFIG.JIRA_USER}:${JIRA_CONFIG.JIRA_CLOUD_TOKEN}`);
jiraAuthHeaderValue = `Basic ${encodedAuthHeader}`;
} else {
const jiraSession = await createSession(JIRA_CONFIG.JIRA_USER, JIRA_CONFIG.JIRA_PASSWORD);
log.info('JIRA session created successfully!');
Expand Down
Loading