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>"
}'komrad rpc plan-forge-pull-request-merge \
--url '<string>'Request#
PlanForgePullRequestMergeRequest#
| Field | Type | Description |
|---|---|---|
url | string* at most 2048 characters | The pull request to plan, by web address. The address's host picks the forge connection. |
Response#
PlanForgePullRequestMergeResponse#
| Field | Type | Description |
|---|---|---|
options | MergeOption[] | Every merge method the forge offers for the pull request, in the forge's order. |
default_method | MergeMethod | The method the pull request merges by when a merge names none. |
head_sha | string | The pull request's head commit when the plan was read. |
Types#
MergeOption#
MergeOption is one way a pull request could merge.
| Field | Type | Description |
|---|---|---|
method | MergeMethod | The merge method. |
allowed | bool | Whether the repository and the pull request's base branch allow the method. |
message | CommitMessage | 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.
MergeMethod#
MergeMethod is how a pull request's commits land on its base branch.
| Value | Description |
|---|---|
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. |