Skip to content

Commit

Permalink
Remove unncessary ticket prefixes in PR lint
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-hollow1-nhsd committed Feb 13, 2024
1 parent a3adf44 commit 96521fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pr-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check ticket name conforms to requirements
run: echo ${{ github.event.pull_request.head.ref }} | grep -i -E -q "(npa-[0-9]+)|(npaspii-[0-9]+)|(adz-[0-9]+)|(amb-[0-9]+)|(dependabot\/)"
run: echo ${{ github.event.pull_request.head.ref }} | grep -i -E -q "(npa-[0-9]+)|(dependabot\/)"
continue-on-error: true

- name: Grab ticket name
if: contains(github.event.pull_request.head.ref, 'npa-') || contains(github.event.pull_request.head.ref, 'NPA-') || contains(github.event.pull_request.head.ref, 'npaspii-') || contains(github.event.pull_request.head.ref, 'NPASPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
run: echo ::set-env name=TICKET_NAME::$(echo ${{ github.event.pull_request.head.ref }} | grep -i -o '\(npa-[0-9]\+\)\|\(npaspii-[0-9]\+\)\|\(adz-[0-9]\+\)|\(amb-[0-9]\+\)' | tr '[:lower:]' '[:upper:]')
if: contains(github.event.pull_request.head.ref, 'npa-') || contains(github.event.pull_request.head.ref, 'NPA-')
run: echo ::set-env name=TICKET_NAME::$(echo ${{ github.event.pull_request.head.ref }} | grep -i -o '\(npa-[0-9]\+\)' | tr '[:lower:]' '[:upper:]')
continue-on-error: true
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

- name: Comment on PR with link to JIRA ticket
if: contains(github.event.pull_request.head.ref, 'npa-') || contains(github.event.pull_request.head.ref, 'NPA-') || contains(github.event.pull_request.head.ref, 'npaspii-') || contains(github.event.pull_request.head.ref, 'NPASPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
if: contains(github.event.pull_request.head.ref, 'npa-') || contains(github.event.pull_request.head.ref, 'NPA-')
continue-on-error: true
uses: unsplash/comment-on-pr@master
env:
Expand Down

0 comments on commit 96521fb

Please sign in to comment.