Skip to content

[Sync] Update project files from source repository (3fa67b8) - #376

Merged
mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20261019-004959-3fa67b8
Oct 19, 2026
Merged

mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20261019-004959-3fa67b8

Conversation

@mrz1836

@mrz1836 mrz1836 commented Oct 19, 2026

Copy link
Copy Markdown
Member

What Changed

  • Trigger workflow (auto-merge-trigger.yml): Added the synchronize type to the pull_request trigger, so it now fires on synchronize, ready_for_review and review_request_removed. The header comment and a new inline comment were updated to match.
  • Docs (workflows.md): Changed the trigger workflow's description to say it wakes up the auto-merge-on-approval workflow on "reviews, pushes and PR state changes".
  • Auto-merge-on-approval workflow, evaluate job: The review counting now only considers verdict states (APPROVED, CHANGES_REQUESTED, DISMISSED), so a later "Comment" review or a pending review no longer replaces an approval. A new rule disables auto-merge when approvals fall below the minimum and the auto-merge was armed by a Bot. A manually armed auto-merge is left alone.
  • Auto-merge-on-approval workflow, outputs: Added a disable-reason output, which the summary step now uses in the "Disable auto-merge" description. Added outputs for require-all-reviews, skip-draft, skip-wip, wip-labels, require-label and automerge-label (defaulting to automerge). Removed the approvals, changes-requested and pending-reviews outputs.
  • Auto-merge-on-approval workflow, apply job: Now passes the new policy values through as environment variables. Its pre-action re-read of the PR now fetches the full PR JSON and re-checks draft state, requested reviewers, labels and WIP indicators, not just state, head SHA and armed status. The diff for this file was trimmed, so the remaining apply-job changes are not described here.

Why It Was Necessary

  • A push between evaluation and apply makes the apply step skip because the head moved. Without a synchronize trigger, the new head never queues its own evaluation and the PR stays unarmed.
  • If an approval is dismissed after auto-merge was armed, the base branch may require fewer approvals than this workflow does. GitHub would then still merge, so the bot-armed auto-merge needs to be revoked.
  • Labels, titles, draft state and reviews can change while the apply job waits without moving the head, so the job re-checks them immediately before acting.

Testing Performed

  • No test runs are shown in the diff. The changes are to workflow YAML and documentation only.
  • Validation would need workflow runs on a test PR, covering a push after evaluation, a dismissed approval on a bot-armed auto-merge, and a "Comment" review submitted after an approval.
  • The workflow files should be checked for valid YAML and for output names that match between the evaluate and apply jobs.

Impact / Risk

  • Behavior change: Pushes to a PR now trigger the permission-less trigger workflow, so there will be more runs of the trigger and the downstream auto-merge workflow.
  • Policy: Auto-merge armed by the App is now disabled when approvals drop below the minimum. Manually armed auto-merge is unaffected.
  • Risk: Medium-low. The change is limited to CI workflow logic, but the evaluate and apply jobs must stay in sync, as the code comment notes. Output renames or removals could break the apply job if any reference is missed.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 00:50
@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.

🟡 Changes recommended

Revocation can be bypassed by eligibility guards or incorrectly override a later manual arming.

2 open issues
What changed in this PR

Updates auto-merge automation to reevaluate pushes and enforce approval policy more consistently.

Changes:

  • Adds PR push events to the trigger workflow.
  • Refines review counting, adds approval-based revocation, and rechecks eligibility before enabling.
  • Updates workflow documentation.
File Description
.github/​workflows/​auto-merge-trigger.yml Adds the synchronize trigger.
.github/​workflows/​auto-merge-on-approval.yml Updates approval handling, policy checks, and summaries.
.github/​docs/​workflows.md Documents push-triggered evaluation.

Review effort: Balanced

@mrz1836
mrz1836 merged commit 6638b87 into master Oct 19, 2026
26 checks passed
@github-actions
github-actions Bot deleted the chore/sync-files-go-bitcoin-20261019-004959-3fa67b8 branch October 19, 2026 00:58
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