[QA-215] fix(ci): stop thank-you-note workflow failing on merged PRs - #16576
[QA-215] fix(ci): stop thank-you-note workflow failing on merged PRs#16576nihal467 wants to merge 2 commits into
Conversation
The Thank You Note Generator triggers on pull_request_target: closed. When a PR is merged, its head branch is usually deleted, so the pre-agent "Checkout PR branch" step failed with 'couldn't find remote ref', aborting the job before the agent could post the thank-you note. Recompile with the current gh-aw (v0.77.5). Its checkout_pr_branch.cjs detects the closed/merged PR and treats the deleted-branch checkout as a warning (checkout_pr_success=true, no setFailed) instead of a hard error, so the workflow proceeds and posts the note. Only the generated lock file changes; the workflow source is unchanged.
WalkthroughChangesThank-you note workflow
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
🎭 Playwright Test ResultsStatus: ⏭️ Skipped No test-related files were changed in this PR. Tests are skipped when changes don't affect:
Run: #10277 |
Deploying care-preview with
|
| Latest commit: |
a3fd552
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://61f088b1.care-preview-a7w.pages.dev |
| Branch Preview URL: | https://fix-thank-you-note-checkout.care-preview-a7w.pages.dev |
Greptile SummaryThis PR fixes the Thank You Note Generator workflow aborting on every merged PR because the old
Confidence Score: 5/5Safe to merge — a minimal, targeted change that lets the agent job continue past a git checkout failure that is expected on every merged PR. The fix is a single continue-on-error: true directive on the one step known to abort when a merged PR's branch is deleted. The checkout_pr_success output already has a || 'true' fallback that correctly represents 'checkout skipped, proceed anyway' to downstream jobs. No logic changes, no new secrets, no permission changes. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "simplify: use continue-on-error instead ..." | Re-trigger Greptile |
Revert the v0.77.5 recompile churn; the failure is fixed with a single continue-on-error on the Checkout PR branch step so merged PRs (deleted head branch) no longer fail the job.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/thank-you-note.lock.yml:
- Around line 114-116: The checkout step in the thank-you workflow must not
blanket-suppress failures via continue-on-error. Update the checkout and
checkout_pr_success handling so only an expected deleted head branch is treated
as successful, while authentication, API, network, and other checkout failures
propagate or stop downstream execution; do not allow missing step output to
default to success.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 60ab9f3d-24b1-4134-930a-2ed291c9c8f5
📒 Files selected for processing (1)
.github/workflows/thank-you-note.lock.yml
|
Filed upstream tracking issue: github/gh-aw#46768. Summary of why this PR keeps the
The one-line |
Proposed Changes
Fixes the Thank You Note Generator workflow failing on every merged PR (e.g. run 29501202990 on #16569).
Symptom: The job fails at the Checkout PR branch step:
Root cause: The workflow triggers on
pull_request_target: closed. When a PR is merged, its head branch is typically deleted, socheckout_pr_branch.cjscannot find the ref and hard-fails, aborting the job before the agent posts the thank-you note — defeating the workflow's entire purpose.Fix: A single
continue-on-error: trueon the Checkout PR branch step. The checkout is not required for posting the note (the agent reads PR metadata via the API), and the downstreamcheckout_pr_successoutput already defaults to'true', so the job proceeds and the note is posted.- name: Checkout PR branch id: checkout-pr + continue-on-error: true if: | github.event.pull_requestScope: 3 lines added to the generated lock file; nothing else touched.
@ohcnetwork/care-fe-code-reviewers
Summary by CodeRabbit