Skip to content

Using iOS 18 for pr scan #408

Using iOS 18 for pr scan

Using iOS 18 for pr scan #408

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