Skip to content
Source
Sign inSign up

From draft to merge

Issues and pull requests / Pull requests

Take a pull request from draft to merge

A pull request goes through several jobs before it lands: a draft, reviews, branch updates and the merge. Each job has a short page, so you read only the one that you need now.

3 min read

Pick the job

You want toRead
Open the pull request before the work is done, then ask for reviewsOpen a draft and ask for reviews
Read the diff, comment on lines, then approve or ask for changesReview a pull request
Merge the new commits of the base branch into your branchBring your branch up to date
Merge with a merge commit, a squash or a rebasePick how a pull request merges
Let the pull request merge by itself when its checks passMerge a pull request when its checks pass
Undo a merge that broke the base branchRevert a merge that broke something
Bring your fork up to date with its parentSync your fork

To see at once if a pull request can merge, and what changed since your last visit, see Read a pull request at a glance. When something fails, see When something on your pull request fails. It covers a failed check, a merge when ready that did not merge, and a part of the page that did not load.

More jobs

See your pull requests in a terminal

src pr status shows three lists:

  • The pull request of your current branch.
  • The open pull requests that you created.
  • The pull requests that wait for your review.

The work that stops at the merge or the close

You merged or closed the pull request, but its CI and its agents still run. Nobody reads that work now, and you pay for it. The forge stops it for you.

A few seconds after the merge or the close, the forge cancels the work on the pull request that still runs:

  • Its CI runs, hidden runs too.
  • Its factory runs. See Stop a run.
  • Its agent jobs, the ones that src agent-task list shows.

Each one ends cancelled, with the reason The pull request was merged. or The pull request was closed.

  • The CI run that the merge starts on the base branch keeps running, because it is a push run of the base branch.
  • Agent sessions stay valid. To stop one, run src agent revoke <session>.
  • If you reopen the pull request, the stopped runs do not start again. Push a commit, or run the workflow again.
  • To keep the runs of one workflow going, set cancelOnClose: false in that workflow. See Runs of a closed pull request.

From an agent or a script

An agent or a script does each job over REST or MCP, with the same rules. Each job page ends with its REST routes and MCP tools. Use the REST API has the other routes.