Skip to content

[Sync] Update project files from source repository (aa0fbca) - #385

Merged
mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20261019-165205-aa0fbca
Oct 19, 2026
Merged

mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20261019-165205-aa0fbca

Conversation

@mrz1836

@mrz1836 mrz1836 commented Oct 19, 2026

Copy link
Copy Markdown
Member

What Changed

  • auto-merge-trigger.yml: Updated a header comment. It now says Dependabot Auto-merge only approves when the base branch's rulesets dismiss stale approvals on push. Previously it only said base branches "should also" dismiss them.
  • dependabot-auto-merge.yml (comments): Rewrote the header notes on revocation. A PR that couldn't be verified is now listed among the cases that revoke the bot approval and auto-merge. A new note says the bot only approves when the base branch's rulesets require an approval and void it on a new push (dismiss stale approvals, or require approval of the most recent push).
  • dependabot-auto-merge.yml (evaluation script):
    • Added a revoke-unverified result for when a GitHub API read fails after the PR is known.
    • Added retries: 3 to the github-script step to retry transient 5xx errors.
    • Wrapped the trigger-run job listing in a try/catch. If it fails, the run now warns and evaluates the PR anyway instead of skipping.
    • Wrapped the PR re-read, the commit listing, and the head-commit lookup in try/catch blocks that return revoke-unverified (fail closed) on error.
  • dependabot-auto-merge.yml (approval conditions): Added a fifth condition to the list of checks before approving. The base branch's rulesets must require an approval and drop it on a new push.
  • auto-merge-github-app.md: Documentation updated to match these changes. The diff for this file was trimmed, so no further detail is given here.

Why It Was Necessary

  • Revoking an approval after someone else pushes depends on the PR-side trigger running, and a pusher who edits the trigger in the same push can prevent that. Requiring rulesets that void approvals on push lets GitHub drop the bot approval regardless of what the workflows do.
  • Previously, a failed API read after the PR was identified could end the run without a result. apply would then not run, and an earlier approval and auto-merge could outlive a push. Failing closed with a revoke avoids that.
  • A failure to list the trigger's jobs could previously cause a skip that also skipped a needed revocation. Evaluating anyway avoids this.

Testing Performed

  • No test results are included in the diff; the changes are to workflow logic, comments, and documentation.
  • Verification would involve running the workflow against Dependabot PRs, including cases with a foreign push and simulated API read failures. These runs are not shown in the diff.
  • Reviewers should confirm that the YAML is valid and that the revoke-unverified result reaches apply.

Impact / Risk

  • Behavior change: The bot now approves only when the base branch's rulesets require an approval and void it on a new push. Repositories without such rulesets will no longer get bot approvals.
  • Fail-closed behavior: A persistent API read failure now revokes an existing bot approval and auto-merge instead of leaving them in place. Re-running the workflow retries the evaluation.
  • Risk: Low to moderate. The changes only make the workflow more conservative, but the new revoke path and the stricter approval condition should be exercised on a real PR.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 16:52
@mrz1836 mrz1836 self-assigned this Oct 19, 2026
@mrz1836 mrz1836 added automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps labels Oct 19, 2026
@github-actions github-actions Bot added update General updates size/M Medium change (51-200 lines) labels Oct 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Security-sensitive approval and revocation behavior needs human validation against live GitHub rulesets and simulated API failures.

No open issues 🎉

What changed in this PR

This PR hardens Dependabot auto-merge by tightening approval requirements and revoking prior approvals when verification fails.

Changes:

  • Requires rulesets that mandate approval and invalidate it after a new push.
  • Adds API retries and a fail-closed revoke-unverified path.
  • Updates workflow comments and setup documentation.
File Description
.github/​workflows/​dependabot-auto-merge.yml Adds stricter approval guards and verification-failure revocation.
.github/​workflows/​auto-merge-trigger.yml Updates the comment describing required ruleset protection.
.github/​docs/​auto-merge-github-app.md Documents approval requirements and failure handling.

Review effort: Balanced

@mrz1836
mrz1836 merged commit f6ec35d into master Oct 19, 2026
40 checks passed
@github-actions
github-actions Bot deleted the chore/sync-files-go-bitcoin-20261019-165205-aa0fbca branch October 19, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps size/M Medium change (51-200 lines) update General updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants