Skip to content

fix(reusable-fix): propagate gh pr view failures in eligibility check - #1565

Merged
rh-hemartin merged 1 commit into
mainfrom
fix/reusable-fix-eligibility-error-propagation
May 28, 2026
Merged

rh-hemartin merged 1 commit into
mainfrom
fix/reusable-fix-eligibility-error-propagation

Conversation

@rh-hemartin

Copy link
Copy Markdown
Member

Summary

  • gh pr view in the "Check fix eligibility" step was called with 2>/dev/null || echo '{"labels":[],"author":""}', silently swallowing API failures
  • A failed call returned empty author/labels, causing the step to exit 1 with a misleading "Human-authored PR without fullsend-fix label" message instead of exposing the real error
  • Removes the silent fallback; failure now emits ::error:: and exits 1 explicitly

Closes #1564

Test plan

  • Verify the eligibility step passes normally on a bot-triggered PR with expected labels
  • Simulate a gh pr view failure (e.g. revoke token) and confirm the job fails with ::error::Failed to fetch PR info rather than the misleading "human-authored" message

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown

Site preview

Preview: https://c0830a54-site.fullsend-ai.workers.dev

Commit: fdc79be97d80579c7a22768a3c8a5881c07a7ef1

@fullsend-ai-review

fullsend-ai-review Bot commented May 27, 2026

Copy link
Copy Markdown

Review

Findings

Medium

  • [protected-path] .github/workflows/reusable-fix.yml — This PR modifies a file under .github/, a protected path requiring human approval. The change is well-justified (fixes silent error suppression in the fix eligibility gate per reusable-fix: gh pr view failure silently bypasses fix eligibility check #1564) and tightly scoped to a single error-handling pattern. Human sign-off is required regardless of correctness.

Info

  • [style-note] .github/workflows/reusable-fix.yml:187,190 — Two other gh pr view calls in the same workflow (lines 187 and 190) also use 2>/dev/null with silent fallbacks (|| true and || echo 'main'). These are intentionally different from the eligibility gate: they gather optional context (HEAD_REF, BASE_REF) where best-effort fallbacks are appropriate, unlike the eligibility check which is a hard gate. No action needed.
Previous run

Review

Findings

Medium

Info

  • [style-consistency] .github/workflows/reusable-fix.yml:250 — The new error handling pattern (|| { echo "::error::..."; exit 1; }) is consistent with similar patterns elsewhere in this workflow (e.g., the fix-commit counting step uses || { echo "::warning::..."; ... }). The escalation from ::warning:: (soft failure with fallback) to ::error:: (hard failure) is appropriate here since eligibility is a gate, not a best-effort count. No action needed.

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label May 27, 2026
@rh-hemartin rh-hemartin self-assigned this May 28, 2026
Silent fallback `|| echo '{"labels":[],"author":""}')` was masking API
errors and causing false "human-authored PR" rejections when `gh pr view`
failed. Remove the fallback so errors surface explicitly.

Closes #1564

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hector Martinez <hemartin@redhat.com>
@rh-hemartin
rh-hemartin force-pushed the fix/reusable-fix-eligibility-error-propagation branch from d969b56 to fdc79be Compare May 28, 2026 07:53
@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels May 28, 2026
@rh-hemartin
rh-hemartin added this pull request to the merge queue May 28, 2026
Merged via the queue into main with commit 9bec1d2 May 28, 2026
9 checks passed
@rh-hemartin
rh-hemartin deleted the fix/reusable-fix-eligibility-error-propagation branch May 28, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reusable-fix: gh pr view failure silently bypasses fix eligibility check

2 participants