fix: re-run PR readiness after Squad CI completes#829
Conversation
🏗️ Architectural Review
Automated architectural review — informational only. |
🟡 Impact Analysis — PR #829Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedci-workflows (1 file)
root (2 files)
scripts (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 2 active Copilot thread(s) resolved (4 outdated skipped) |
| ❌ | CI passing | 14 check(s) still running |
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
Pull request overview
This PR updates the PR readiness workflow so it re-runs after the main “Squad CI” workflow completes, ensuring the readiness comment reflects final CI + review/thread state rather than the initial push-time snapshot.
Changes:
- Add a
workflow_runtrigger on “Squad CI” completion. - Add conditional logic to support both
pull_request_targetandworkflow_runpayload shapes. - Skip
workflow_runevents that aren’t associated with a PR.
ae181bf to
47c1691
Compare
47c1691 to
6856e0b
Compare
0cef2a4 to
dc4f9ed
Compare
Add workflow_run trigger so readiness comment updates with final CI status instead of showing stale in-progress data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dc4f9ed to
90f20ff
Compare
tamirdresher
left a comment
There was a problem hiding this comment.
✅ LGTM — Smart refactoring: deduplicates PR fetch, API draft status properly overrides env var fallback. Workflow_run trigger enables fresh readiness data. Tests cover the key scenarios. Minor note: verify PR_LABELS fallback string '[]' parses correctly in toJson, but non-blocking.
Problem
The readiness workflow (\squad-pr-readiness.yml) runs on \pull_request_target\ which triggers on push. It snapshots CI status, Copilot review status, and thread status at that moment — but CI hasn't finished and Copilot hasn't re-reviewed yet. The readiness comment always shows stale data.
Fix
Add a \workflow_run\ trigger so readiness also runs after the main CI workflow (\Squad CI) completes. This gives a second pass that captures the final CI state.
The script (\pr-readiness.mjs) already updates an existing comment (searches for <!-- squad-pr-readiness -->\ marker), so a second run just updates the same comment with fresh data.
Changes
Scope
Repo-health only — no product code changes.