Repository navigation
DEV-1168: Pass title check for bot PRs and fetch current title on rerun #4
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: | |
| if: ${{ github.event.pull_request.user.type != 'Bot' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check for Linear issue ID | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| if echo "$PR_TITLE" | grep -qPi '^[A-Z]+[-\s]\d+\b'; then | |
| echo "PR title starts with a Linear issue ID." | |
| elif echo "$PR_TITLE" | grep -qPi '^NO-ISSUE\b'; then | |
| echo "::notice::PR explicitly opted out of issue association." | |
| else | |
| echo "::error::PR title must start with a Linear issue ID (e.g., \"ENG-123: Add feature\") or \"NO-ISSUE:\" to opt out." | |
| exit 1 | |
| fi |