Repository navigation
DEV-1168: Fetch current PR title on rerun #6
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 issue ID | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| PR_AUTHOR_TYPE: ${{ github.event.pull_request.user.type }} | |
| run: | | |
| if [ "$PR_AUTHOR_TYPE" = "Bot" ]; then | |
| echo "Bot PR — skipping check." | |
| elif 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 |