Skip to content

merge: owner-approved workflow-path PRs should auto-merge instead of parking at 090 #14664

Closed

Description

@clubanderson

Problem

The contributor lane's workflow-path fence (contributor-lane:workflow-path, src/pkg/github/automerge/automerge_contributor_lane.go) refuses to merge any PR touching .github/workflows/** / .github/actions/**, with no override. Since #14579, an owner's approval on such a PR routes it to stage/090-ready-for-human-merge with a "click Merge" caption — the hive still never merges it.

Live examples parked today, all approved by the owner (GitHub review APPROVED on the current head + dashboard decision approve, labels lgtm + stage/090):

Owner's words: "if i approved it, it should auto merge".

Why the fence was absolute

automerge_contributor_adopt.go says "The App token cannot push" workflow files. That is no longer true for merging into the base: gh api /orgs/hivecommons/installations shows the hivecommons-hive App has workflows: write and contents: write. (Pushing to a fork branch is a separate matter and out of scope.)

Desired behaviour

  1. Explicit owner approval on a workflow-path PR is either (a) a GitHub pull-request review with state APPROVED on the current head by a trusted merger (the existing isTrustedMerger / SetMergerAuthorizer notion — the same bar /hive decision already uses), or (b) a /hive decision approve (dashboard approve) by such a login bound to the current head. Approval on an older head does not count; a new push re-arms the fence (stale approval → back to 090 with "re-approve after push").
  2. When approved, the fence is released and the PR goes through the normal merge gate (CI green, DCO, lgtm, no hold/do-not-merge, no sentinel-alert) and the hive merges it like any other PR. Log workflow-path fence released by owner approval login=… head=… and leave one audit comment <!-- hive:workflow-approval head=… by=… --> per head.
  3. If the merge call fails with a workflows permission error (some installs lack it), fall back to today's behaviour: hive:unauthorized via markUnauthorized (step merge-workflow-path) and route to 090 "click Merge". Never loop.
  4. Config toggle, default on: auto_merge.contributor_lane.owner_approval_releases_workflow_fence: true (sibling of approve_held_runs_for_registry_trusted, ✨ feat(automerge): approve held workflow runs for registry-trusted contributors #14520).
  5. Unapproved workflow-path PRs behave exactly as today.
  6. The 090 reason for an unapproved workflow-path PR should read "awaiting owner approval" rather than "hive never merges workflow files".

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 27, 2026
  2. added a commit that references this issue on Oct 27, 2026
    ef33f29
  3. github-actions commented on Oct 27, 2026

    @github-actions
    Contributor

    @clubanderson this issue was closed by @hivecommons-hive[bot] as completed.

    If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.

    If you are still seeing the problem, comment /reopen and it will be reopened for you — you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.

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

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions