komrad

set_forge_pull_request_auto_merge

Turn a pull request's auto-merge on or off on its forge.

writesidempotentdestructiveCLI onlyForge

Calling it#

curl -X POST http://127.0.0.1:8787/komrad.forge.v1.ForgeService/SetForgePullRequestAutoMerge \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "<url>"
}'

Request#

SetForgePullRequestAutoMergeRequest#

FieldTypeDescription
urlstring*

at most 2048 characters

The pull request to change, by web address. The address's host picks the forge connection.

head_shastring

at most 64 characters

The head commit the caller expects. The forge refuses to turn auto-merge on once the branch has moved past it. Empty accepts any head.

onbool

Whether the pull request merges by itself once its checks and reviews pass.

methodMergeMethod

How the pull request merges once it may. Unspecified merges by a method the base branch allows.

headlinestring

not empty

at most 1024 characters

The first line of the commit the merge writes. Unset leaves it to the forge.

bodystring

at most 65536 characters

The rest of the commit the merge writes. Unset leaves it to the forge, and empty writes a headline alone.

Response#

Empty#

No fields.

Types#

MergeMethod#

MergeMethod is how a pull request's commits land on its base branch.

ValueDescription
merge

The commits land under a merge commit.

squash

The commits land as one new commit.

rebase

The commits are replayed onto the base branch one by one.

fast_forward

The base branch moves to the head commit, without a commit of its own.