Skip to main content
POST
Merge a change request

Authorizations

Authorization
string
header
required

An API key (pch_...) or the token from pch login.

Path Parameters

owner
string
required
Example:

"patch"

slug
string
required
Example:

"demo-mod"

number
integer
required
Required range: x >= 1
Example:

12

Body

application/json
squash
boolean
default:false
message
string
Required string length: 1 - 20000
head
string

The request's latest commit as you last read it. When it's moved on since, it doesn't merge: 409 request_moved.

Pattern: ^[0-9a-f]{40}$

Response

Merged

number
integer
required
Example:

12

title
string
required
Example:

"Port to 26.5"

description
string
required
state
enum<string>
required

open: waiting on the repo's owner. merged: its commits are in the branch it was for. declined: the owner turned it down. withdrawn: its author took it back.

Available options:
open,
merged,
declined,
withdrawn
from
string | null
required

The repo its branch is in, as owner/slug: the fork it comes from, or this repo itself for one of its own branches. Null if you can't reach the fork.

Example:

"kai/sky-mod"

branch
string
required

The branch it offers, in from

Example:

"port-26.5"

into
string
required

The branch it would change in this repo

Example:

"26.5"

head_commit
string
required

Its latest commit, as copied into this repo, where a clone doesn't see it: git fetch <clone_url> <head_commit> gets its commits while it's open.

problems
string[]
required

What stopped the latest push to its branch being copied, which stays out of the request until it's fixed: a refusal, a fork that isn't open, which copies when it opens, or a copy that failed, which a new push tries again. Empty says nothing has stopped one, and a copy may still be on its way.

author
string | null
required

Who opened it: their username

Example:

"kai"

talk_count
integer
required

Posts in its talk

created_at
string<date-time>
required
updated_at
string<date-time>
required
closed_at
string<date-time> | null
required
closed_by
string | null
required

Who merged, declined or withdrew it: their username

merge_commit
string | null
required

The commit its branch was at after the merge.