Skip to content

PR Quality Check for APM-6390 opened by @koppuravuris #137

PR Quality Check for APM-6390 opened by @koppuravuris

PR Quality Check for APM-6390 opened by @koppuravuris #137

Workflow file for this run

name: PR Quality Check
run-name: PR Quality Check for ${{ github.event.pull_request.head.ref }} opened by @${{ github.actor }}
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Set TICKET_NAME environment variable if branch name references a Jira ticket
env:
REF: ${{ github.event.pull_request.head.ref }}
run: |
OUTPUT=$(echo "$REF" | { grep -i -E -q "(apm-[0-9]+)|(apmspii-[0-9]+)|(adz-[0-9]+)|(amb-[0-9]+)|(amp-[0-9]+)|(dependabot\/)" || test $? = 1; })
if [ ! -z "$OUTPUT" -a "$OUTPUT" != " " ]; then
TICKET_NAME=$(echo $OUTPUT | tr '[:lower:]' '[:upper:]')
echo "TICKET_NAME=$TICKET_NAME" >> "$GITHUB_ENV"
fi
- name: Comment on PR with link to JIRA ticket
uses: thollander/actions-comment-pull-request@v2
if: ${{ env.TICKET_NAME }}
with:
message: |
This branch is work on a ticket in the NHS England's API Management JIRA Project:
# [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME}})
comment_tag: jira-ticket
- name: Add UAT Portal Deployment Instructions to PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Manually run the [Publish Spec to Bloomreach UAT Portal](https://github.com/NHSDigital/proxygen-api-specification/actions/workflows/publish-uat.yml) to preview specification on the [UAT Portal](https://uat2.nhsd.io/developer/api-catalogue/proxy-generator) (requires VPN).
comment_tag: uat-deploy
- name: Checkout
uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-build-cache-npm-packages-${{ hashFiles('**/package-lock.json') }}
- name: Install repo
run: make install
- name: Vacuum OpenAPI Spec linter
run: make lint