diff --git a/.github/workflows/pr-lint.yaml b/.github/workflows/pr-lint.yaml index 576fa82..4bc5abf 100644 --- a/.github/workflows/pr-lint.yaml +++ b/.github/workflows/pr-lint.yaml @@ -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: