test: Phase 4B GitHub API Integration Tests (118 tests) #276
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: "Validate PR Template" | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize] | |
| jobs: | |
| validate-template: | |
| name: Check PR Template | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const body = context.payload.pull_request.body || ''; | |
| const hasLinkedIssues = body.includes('## Linked issues'); | |
| const hasChangelog = body.includes('## Changelog'); | |
| const hasTestPlan = body.includes('## Test') && (body.includes('plan') || body.includes('Plan')); | |
| const hasChecklist = body.includes('- [x]') || body.includes('- [ ]'); | |
| const missing = []; | |
| if (!hasLinkedIssues) missing.push('Linked issues'); | |
| if (!hasChangelog) missing.push('Changelog'); | |
| if (!hasTestPlan) missing.push('Test plan'); | |
| if (!hasChecklist) missing.push('Checklist'); | |
| if (missing.length > 0) { | |
| core.setFailed(`Missing required sections: ${missing.join(', ')}`); | |
| } else { | |
| core.notice('✅ PR template is complete'); | |
| } |