Repository navigation
DEV-1168: Add advisory PR title check for Linear ticket IDs #2
Workflow file for this run
This file contains hidden or 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: PR Title Check | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened] | |
| jobs: | |
| check-title: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check for Linear ticket ID | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| if echo "$PR_TITLE" | grep -qP '^[A-Z]+-\d+\b'; then | |
| echo "PR title starts with a Linear ticket ID." | |
| else | |
| echo "::warning::PR title must start with a Linear ticket ID (e.g., \"ENG-123: Add feature\")" | |
| exit 1 | |
| fi |