Skip to content

Mark the stale unarmed refusal comment superseded once enable-auto-merge arms the pull request #18876

Description

@kyle-sexton

Steps to reproduce

  1. On a lanes App pull request, let enable-auto-merge (.github/scripts/pr-merge/enable-auto-merge.mjs) refuse to arm and post its refusal comment ("native auto-merge leaves this pull request unarmed at head ...").
  2. Let a later run arm native auto-merge at the head (or, for a stack's bottom layer, request the async merge), and let the pull request merge.

Expected behavior

Once the lane arms the pull request, or GitHub accepts (or already holds) the async merge of a stack's bottom layer, the lanes App's earlier refusal comments no longer read as standing.

Actual behavior

The refusal comment stays as posted, so a merged pull request still says it is unarmed, as on #18737 and #18763.

Severity

Low

Severity justification

Misleading pull request history for readers and agents: a merged pull request claims it was left unarmed; merges themselves are unaffected.

Suggested fix location

.github/scripts/pr-merge/enable-auto-merge.mjs, main(): after a successful arm, and after an accepted or 409 already-pending async merge of a stack bottom layer.

Done when

  • After a successful arm, each lanes App refusal comment on that pull request (Bot author, App login, refusal marker in the first two lines, as priorRefusal matches) is edited in place to say the arm at that head superseded it, with no marker left.
  • After an accepted or already-pending (409) async merge of a stack's bottom layer, the same rewrite runs, naming the async merge request; a refused async merge rewrites nothing.
  • A failed arm, a report-only run, or a person's comment edits nothing; a failed edit logs a warning and leaves the arm or merge request standing.
  • Tests in enable-auto-merge.test.mjs cover each case above; docs/conventions/pr-pipeline/README.md states the behavior, with a patch changelog fragment for pr-pipeline.

Source: hub daily-pass finding (hub-notes L1103/L1108). Fixed by #18807.

Activity

  1. added
    session-owned
    on Nov 24, 2026
  2. added theissue type on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    session-owned

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions