komrad

plan_forge_pull_request_merge

Read the merge methods a pull request's forge offers, whether its base branch allows each, and the commit message the forge would write for each.

read-onlyidempotentCLI onlyForge

Calling it#

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

Request#

PlanForgePullRequestMergeRequest#

FieldTypeDescription
urlstring*

at most 2048 characters

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

Response#

PlanForgePullRequestMergeResponse#

FieldTypeDescription
optionsMergeOption[]

Every merge method the forge offers for the pull request, in the forge's order.

default_methodMergeMethod

The method the pull request merges by when a merge names none.

head_shastring

The pull request's head commit when the plan was read.

Types#

MergeOption#

MergeOption is one way a pull request could merge.

FieldTypeDescription
methodMergeMethod

The merge method.

allowedbool

Whether the repository and the pull request's base branch allow the method.

messageCommitMessage

The message the forge writes for the method by itself. Unset for a method that doesn't write a commit of its own.

CommitMessage#

CommitMessage is the text of the commit a merge writes.

FieldTypeDescription
headlinestring

The commit's first line.

bodystring

The rest of the commit's message. Empty writes a headline alone.

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.