Skip to content

Commit 63dae17

Browse files
GHA-152 Fix JIRA URL construction for sandbox and production environments (#67)
Co-authored-by: Yasen Pavlov <yasen.pavlov@sonarsource.com>
1 parent 6522bb7 commit 63dae17

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

create-jira-version/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,9 @@ runs:
8383
env:
8484
JIRA_USER: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
8585
JIRA_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}
86-
JIRA_PROD_URL: "https://sonarsource.atlassian.net/"
87-
JIRA_SANDBOX_URL: "https://sonarsource-sandbox-608.atlassian.net/"
8886
PROJECT_KEY_INPUT: ${{ inputs.jira-project-key || env.JIRA_PROJECT_KEY }}
8987
VERSION_NAME: ${{ steps.determine-new-version-name.outputs.new-version-name }}
90-
JIRA_URL: ${{ ((inputs.use-jira-sandbox || env.USE_JIRA_SANDBOX) == 'true') && env.JIRA_SANDBOX_URL || env.JIRA_PROD_URL }}
88+
JIRA_URL: "https://sonarsource${{ ((inputs.use-jira-sandbox || env.USE_JIRA_SANDBOX) == 'true') && '-sandbox-608' }}.atlassian.net/"
9189
run: |
9290
if [[ -z "$PROJECT_KEY_INPUT" ]]; then
9391
echo "::error::Both jira-project-key input and JIRA_PROJECT_KEY environment variable are missing. One must be provided."

update-release-ticket-status/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ runs:
4343
env:
4444
JIRA_USER: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
4545
JIRA_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}
46-
JIRA_PROD_URL: "https://sonarsource.atlassian.net/"
47-
JIRA_SANDBOX_URL: "https://sonarsource-sandbox-608.atlassian.net/"
4846
ASSIGNEE_INPUT: ${{ inputs.assignee }}
4947
TICKET_KEY: ${{ inputs.release-ticket-key }}
5048
STATUS: ${{ inputs.status }}
51-
JIRA_URL: ${{ ((inputs.use-jira-sandbox || env.USE_JIRA_SANDBOX) == 'true') && env.JIRA_SANDBOX_URL || env.JIRA_PROD_URL }}
49+
JIRA_URL: "https://sonarsource${{ ((inputs.use-jira-sandbox || env.USE_JIRA_SANDBOX) == 'true') && '-sandbox-608' }}.atlassian.net/"
5250
run: |
5351
ASSIGNEE_FLAG=""
5452
if [[ -n "$ASSIGNEE_INPUT" ]]; then

0 commit comments

Comments
 (0)