Using iOS 18 for pr scan #407
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🎫 Validate ticket reference | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, edited] | |
jobs: | |
validate-ticket: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.base.ref == 'develop' && !startsWith(github.event.pull_request.head.ref, 'release/') && !contains(github.actor, 'renovate') | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Check ticket reference | |
env: | |
PR_BODY: ${{ github.event.pull_request.body }} | |
TICKET_REGEX: '<ticket>\s*[A-Z]+-[0-9]+\s*</ticket>' | |
run: | | |
if ! grep -zqP "$TICKET_REGEX" <<< "$PR_BODY"; then | |
echo "::error::Pull requests must have a ticket number in the pull request body in the format '<ticket>STRING-XXX</ticket>' where XXX is a numeric ticket number" | |
exit 1 | |
fi |