Pull request flow

What the repository's webhook does to an item when a pull request naming it opens, turns into a draft, merges or closes: the moves the project's two switches allow, the statuses they start from, the kinds that finish on a merge, the gates that can refuse a move, and what is announced.

By the end of this page you will know what happens to an item when a pull request that names its key opens, merges or closes, which of those moves your project makes on its own, where they start from and where they stop, and what to do when one did not happen. Linking itself is on the Git linking page; the switches are on the project's settings page.

The two switches

A project decides, under its settings, whether the host's word moves its items:

  • An opened pull request moves the item to review. When on, a pull request that opens for review and names an item in Backlog, Ready or In progress moves it to In review.
  • A merged pull request moves the item on. When on, a merged pull request that names an item in Ready, In progress or In review moves it on: a story or a bug goes to In QA, where the testers verify it against its criteria; a task, a sub-task, a spike or an improvement goes to Done, because nothing waits to verify it.

Both switches are on when a project is created. Switch either off and the links still land; only the moves stop, and the team moves the items by hand on the board.

What each event does

The host saysThe referenceThe item
A pull request opens for review, or reopensLinked, OpenTo In review, when the first switch is on and it was before
A draft pull request opensLinked, DraftNothing
A draft is marked ready for reviewOpenTo In review, as for an opening
A pull request is pushed to, edited or relabelledIts state refreshedNothing
A pull request mergesMerged, with whenTo In QA or Done by kind, when the second switch is on
A pull request closes without mergingClosedNothing; the work is not done
A branch naming the item is deletedThe branch ClosedNothing

A move is made once, the first time the host reports the opening or the merge; a redelivery of the same event changes nothing. A pull request naming two items moves both.

What can stop a move

A move the webhook makes obeys the same rules as a move by hand, and when a rule refuses it the item stays where it is, the link still lands, and the refusal is noted for the operators:

  • The lifecycle. An item moves only along the paths its status allows; a pull request opened on an item already In QA or Done moves nothing.
  • The column limit. A board column at its limit takes no new card, from the webhook as from a hand.
  • The Definition of Done. A task moving to Done waits for its required entries when the project asks for the Definition of Done; an unticked list leaves the task In review with its merged pull request, and a person ticks the list and moves it.

Links by hand never move an item

A pull request linked from the item's flyout, over the API or through link_pull_request carries the state you give it and moves nothing; the moves follow the host's own word. Linking a merged pull request after the fact, move the item yourself.

What is announced

  • The link itself, as code.pull_request_linked, the first time the pull request is seen, and code.pull_request_merged when it merges; see the code.* events.
  • The move, as work_item.transitioned with the status it came from and went to, exactly as a move by hand is announced; see the work_item.* events.
  • The item's assignee, reporter and reviewer hear of a pull request opening for review and of one merging, under the Code alert class, through the channels they chose.
  • The item's history records the move as the system's, with the reason that it was a transition, so a person can see that the webhook moved it and when.

How is this guide?

Last updated on

On this page

What changed recentlyEvery release of Zuse Bifrost, with the pages it touched.

For AI agents: llms.txt ยท llms-full.txt