Skip to content

Backlog capture: a PR that is only part of a task has no gated finish, so it merges around the gates #452

Backlog

Description

@radiusred-bossy

Seen in: a hub on protocol 2.1 (v2.1.1) that delivers large tasks as several PRs, each saying "Part of #N", with the last one closing the task.

The gap: task finish <ref> takes a task and merges the PR that closes it. A PR that is only part of a task has no gated path, so it gets merged with a plain gh pr merge --rebase. That skips everything task finish enforces:

  • the approval is on the current head;
  • the base is right;
  • the required checks have passed;
  • the record of the merge.

On one busy day, about half the merges in that hub were piece PRs, so half the merges went around the gates. The coordination layer made up for it with a scripted pre-merge checklist in each merge agent's brief. That works, but it's convention, not protocol.

Suggested shape: task finish <ref> --piece <pr> (or a piece finish <pr> verb). It runs the same gates against that PR, rebase-merges it, deletes its head branch and records it on the task's trail, but leaves the task open. It refuses if the PR's closing references would close the task, since that is the plain task finish path, and if the PR doesn't reference the task at all.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions