Skip to content

Commit

Permalink
[CDX-987] Verifica relacionamento com Jira a partir do título no push (
Browse files Browse the repository at this point in the history
…#16)

* feat: check Jira reference in title on push.
  • Loading branch information
aldemonb authored Sep 23, 2024
1 parent 45a160f commit 3a9dcf0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions jira-issue-required/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,20 @@ runs:
echo "POSSIBLE_ISSUE_REFERENCE=${{ inputs.possible_issue_reference }}" >> "$GITHUB_ENV"
echo "ISSUE_KEY_FOUND=0" >> "$GITHUB_ENV"
- name: Get Possible Issue Reference - Default / Push Event
- name: Get Possible Issue Reference - Default / Push Event in PR
if: env.POSSIBLE_ISSUE_REFERENCE == '' && github.event_name == 'push' && github.event.pull_request != null
shell: bash
run: echo "POSSIBLE_ISSUE_REFERENCE=${{ github.ref_name }} ${{ github.event.pull_request.title }}" >> "$GITHUB_ENV"

- name: Get Possible Issue Reference - Default / Push Event without PR
if: env.POSSIBLE_ISSUE_REFERENCE == '' && github.event_name == 'push'
shell: bash
run: echo "POSSIBLE_ISSUE_REFERENCE=${{ github.ref_name }}" >> "$GITHUB_ENV"

- name: Get Possible Issue Reference - Default / Pull Request Event
if: env.POSSIBLE_ISSUE_REFERENCE == '' && startsWith(github.event_name, 'pull_request')
shell: bash
run: echo "POSSIBLE_ISSUE_REFERENCE=${{ github.head_ref }}${{ github.event.pull_request.title }}" >> "$GITHUB_ENV"
run: echo "POSSIBLE_ISSUE_REFERENCE=${{ github.head_ref }} ${{ github.event.pull_request.title }}" >> "$GITHUB_ENV"

- name: Jira Login
uses: atlassian/gajira-login@v3
Expand Down

0 comments on commit 3a9dcf0

Please sign in to comment.