fix(ci): find PR by author instead of branch name for downstream triggers#451
fix(ci): find PR by author instead of branch name for downstream triggers#451github-actions[bot] merged 4 commits intodevfrom
Conversation
…gers The opencode action auto-creates branches with names like opencode/schedule-XXX, not test/MODULE. The old trigger step searched for PRs by branch name which never matched. Now finds the PR by PAT author, labels it, then triggers build and review workflows.
📋 SummaryThis PR fixes a CI workflow bug where downstream Linked Issues: Mentions PR #450 as the root cause (no linked issue number). Scope: This is a single-file change to 🔴 Critical Issues (Must Fix - Blocks Merge)None identified. ✅ All previously reported critical issues have been resolved. (No previous automated reviews exist for this PR.)
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | N/A | YAML configuration |
| Open/Closed | N/A | |
| Liskov Substitution | N/A | |
| Interface Segregation | N/A | |
| Dependency Inversion | N/A | |
| Average | N/A |
🎯 Final Assessment
Overall Confidence Score: 87%
How to interpret:
- 61-80%: Minor concerns, mostly ready with some fixes
- 81-100%: High confidence, ready to merge or with trivial fixes
Confidence Breakdown:
- Code Quality: 95% - The workflow changes are syntactically correct YAML with proper GitHub Actions expressions and outputs
- Completeness: 85% - Fixes the described problem, but the
sleep 5race condition is a minor gap - Risk Level: 90% - Very low risk; only affects CI workflow, no application code changes
- Test Coverage: N/A - No application code to test; manual verification via the fix's own execution is the test
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0 (N/A - workflow YAML)
- Overall confidence >= 60%
- No security concerns (uses secrets properly, limited scope)
- Tests present and passing (N/A - CI fix; will be validated on merge)
Verdict:
MERGE - The fix correctly addresses the root cause by querying PRs by author instead of branch name, and properly labels the PR for downstream workflow triggering. The sleep 5 race condition is a minor concern that can be addressed in a follow-up if it proves problematic.
{
"reviewed_sha": "4c8902d608f0515b635c6d9a5abb5b6062d151a8",
"critical_issues": 0,
"high_priority_issues": 0,
"medium_priority_issues": 1,
"overall_confidence_score": 87,
"recommendation": "MERGE"
}Replace fragile sleep 5 with up to 5 retries at increasing intervals (3s, 6s, 9s, 12s, 15s) to handle GitHub API latency.
📋 SummaryPR #451 fixes a CI workflow bug in Linked Issues: Mentions PR #450 as the root cause but does not link with "Closes #450". 🔴 Critical Issues (Must Fix - Blocks Merge)None identified. ✅ All previously reported critical issues have been resolved. (No previous automated reviews for this PR.)
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | N/A | YAML configuration |
| Open/Closed | N/A | |
| Liskov Substitution | N/A | |
| Interface Segregation | N/A | |
| Dependency Inversion | N/A | |
| Average | N/A |
🎯 Final Assessment
Overall Confidence Score: 90%
How to interpret:
- 81-100%: High confidence, ready to merge or with trivial fixes
Confidence Breakdown:
- Code Quality: 95% - Syntactically correct YAML, proper GitHub Actions expressions, correct use of
--jqfilters and$GITHUB_OUTPUT - Completeness: 88% - Fixes the core problem (PR lookup by author + labeling); retry loop addresses the previous race condition
- Risk Level: 95% - Very low risk; only affects CI, no application code
- Test Coverage: N/A - CI workflow; validated on merge
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0 (N/A - workflow YAML)
- Overall confidence >= 60%
- No security concerns
- Tests present and passing (N/A - CI fix)
Verdict:
MERGE - The fix properly addresses the root cause by querying PRs by author instead of branch name, adds proper retry logic with exponential backoff, and correctly labels the PR for downstream workflow triggering.
{
"reviewed_sha": "1faf6954320b8fc104cf7a07db169f8578a173ea",
"critical_issues": 0,
"high_priority_issues": 0,
"medium_priority_issues": 1,
"overall_confidence_score": 90,
"recommendation": "MERGE"
}
📋 SummaryPR #451 fixes a CI workflow bug where downstream Linked Issues: Mentions PR #450 as root cause but does not link with "Closes #450". 🔴 Critical Issues (Must Fix - Blocks Merge)None identified. ✅ All previously reported critical issues have been resolved. (No critical issues were ever reported for this PR.)
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | N/A | YAML configuration |
| Open/Closed | N/A | |
| Liskov Substitution | N/A | |
| Interface Segregation | N/A | |
| Dependency Inversion | N/A | |
| Average | N/A |
🎯 Final Assessment
Overall Confidence Score: 93%
How to interpret:
- 81-100%: High confidence, ready to merge or with trivial fixes
Confidence Breakdown:
- Code Quality: 95% - Syntactically correct YAML, proper GitHub Actions expressions, correct
--jqfilters and$GITHUB_OUTPUT - Completeness: 92% - Fixes the core problem (PR lookup by author instead of branch name); retry loop with exponential backoff addresses previous race condition concerns
- Risk Level: 95% - Very low risk; only affects CI, no application code
- Test Coverage: N/A - CI workflow; validated on merge
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0 (N/A - workflow YAML)
- Overall confidence >= 60%
- No security concerns
- Tests present and passing (N/A - CI fix)
Verdict:
MERGE - The fix correctly addresses the root cause by querying PRs by author instead of branch name, adds robust retry logic with exponential backoff (8 attempts, ~108s max wait), and properly labels the PR for downstream workflow triggering. All medium priority concerns from previous reviews have been adequately addressed.
{
"reviewed_sha": "d31a00353f5f66aa4f3fe14d4726f59efc6c3b8e",
"critical_issues": 0,
"high_priority_issues": 0,
"medium_priority_issues": 1,
"overall_confidence_score": 93,
"recommendation": "MERGE"
}…e retries - Add base_branch output to select-module step, replace all hardcoded dev and github.event.repository.default_branch references - Extract MAX_RETRIES variable for single-point adjustment - Guard gh pr edit failure with warning annotation
|
Based on the provided context and the diff, let me analyze the current state of PR #451. Previous Automated Reviews Analysis: The previous reviews identified:
The current diff (sha
📋 SummaryThis PR fixes a CI workflow bug in Linked Issues: Mentions PR #450 as root cause but does not link with "Closes #450". 🔴 Critical Issues (Must Fix - Blocks Merge)None identified. ✅ All previously reported critical issues have been resolved. (No critical issues were ever reported for this PR.)
|




Problem
The
Trigger downstream workflowsstep inopencode-test-writer.ymlwas searching for PRs by exact branch name (test/MODULE), but the opencode action auto-creates branches with names likeopencode/schedule-XXX. This caused the lookup to always return "No PR found" and downstream build/review workflows were never triggered.Additionally, the opencode action doesn't add the
automated-testlabel to PRs it creates, so label-based filtering also failed.Fix
Splits the trigger step into two:
automated-testlabelbuild.ymlandopencode-pr.ymlThis was the root cause of PR #450 getting no build or review triggered.