Skip to content

Commit

Permalink
[jira] dynamic project key
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Jun 26, 2023
1 parent 464eca3 commit 063aa50
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,17 @@ jobs:
esac
env:
ISSUE_LABEL: ${{ github.event.issue.labels[0].name }}
- name: Get project key
id: project_key
env:
GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
run: |
echo "key=${GITHUB_REPOSITORY_NAME^^}" >> $GITHUB_OUTPUT
- name: Create
id: create
uses: acquia/gajira-create@bearer
with:
project: CLI
project: ${{ steps.project_key.outputs.key }}
issuetype: ${{ steps.issue_type.outputs.type }}
summary: ${{ github.event.issue.title }}
description: ${{ github.event.issue.html_url }}
Expand All @@ -64,11 +70,12 @@ jobs:
- name: Get Jira issue
id: get-issue
run: |
if [[ "$ISSUE_TITLE" =~ ^(CLI-[0-9]+): ]]; then
if [[ "$ISSUE_TITLE" =~ ^($PROJECT_KEY-[0-9]+): ]]; then
echo "issue=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
fi
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
PROJECT_KEY: ${{ steps.project_key.outputs.key }}
- name: Login
if: steps.get-issue.outputs.issue
uses: acquia/gajira-login@bearer
Expand Down

0 comments on commit 063aa50

Please sign in to comment.