dev.knotless.getMergeStatus

Whether an open pull can merge now, decided as `knotless pull merge` decides it, without merging: whether its head merges with its target branch as it is now, and, in a repository that names runners, whether each workflow that runs on it passed there. And what the account asking may do to it: merge it, queue it, retarget it or run its checks again. Requires the session cookie the pages' login sets, or a service token from the caller's PDS, audience the appview's DID, for this method.

Details · query
Kindquery
Authorityknotless.dev
Indexed

Query

query · GET

Parameters

query string

pull

requiredstring · at-uri

The dev.knotless.pull record.

repo

requiredstring · at-uri

The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.

Output

application/json
Reference

base

requiredstring

The commit its target branch is at, in hex.

checks

requiredstring

Where its checks stand at its head merged with its base: pending for those not run there; none when the repository names no runners, so a merge waits for none, or when it conflicts.

  • knownValues: passed | failed | running | pending | none

The lines of the target branch's CODEOWNERS file that were skipped, and why: one naming a team, say.

itemsref
Reference

The files that conflict.

itemsref
Reference

deletes

string

Its head branch, which merging deletes unless asked to keep it.

head

requiredstring

The commit its head branch is at, in hex.

may

requiredref
Reference

method

requiredstring

How it would merge: a merge commit naming the pull; into a branch protected as linear, one squashed commit. fastForward is no longer made.

  • knownValues: fastForward | merge | squash

Why the merge queue would not land it yet, when this server knows: undelegated when no runner the repository names may push, so its queue lands through this server's gateway, and the owner has not delegated writes to it.

  • knownValues: undelegated

queueOnly

boolean

Its target branch takes pulls only through the merge queue: queue it with dev.knotless.queuePull, as dev.knotless.mergePull refuses it. Absent is false.

reason

string

Why it cannot merge now, in the words a merge would refuse it with; and when the account asking may not merge it, that too.

reviews

string

Where its reviews stand against what its target branch's rule asks of them (dev.knotless.repo#reviews): none when the rule asks nothing of them, or when it conflicts.

  • knownValues: passed | blocked | none

What its reviews lack, each as `knotless pull merge --check` lists it: `reviews 1 of 2`, `owners of web/: @alice or @bob`, `changes asked by @carol`.

itemsref
Reference

The approvals that do not count toward its target branch's rule, and why: `@dan's approval does not count: only the owner's and collaborators' approvals count`, or one of an earlier head when only approvals of its head as it is now count.

itemsref
Reference

state

requiredstring

clean when it can merge now; conflicting when its head does not merge with its base; blocked when its checks have not all passed, or it is not reviewed as its target branch's rule asks; draft, whatever else holds, while its author has not marked it ready.

  • knownValues: clean | conflicting | blocked | draft

Errors

NotFound

No such repository.

AuthenticationRequired

No one asked: log in to the pages first.

#autoMerge

object

Where the pull's merge when checks pass stands, if it was ever set and not cancelled by someone: a runner the repository names merges it once it would merge.

Properties

by

requiredref

Who set it.

For pushed, the owner of the head repository pushed to.

state

requiredstring

set while it stands; pushed once someone who may not merge it pushed to its head since, and retargeted once it moved to another branch, either of which cancels it.

  • knownValues: set | pushed | retargeted

#conflict

object

A file that both sides changed so that they do not merge.

Properties

path

requiredstring

From the repository's root.

#note

object

A line of text about the pull's reviews.

Properties

text

requiredstring

In plain words.

#permissions

object

What the account asking may do to the pull: what its part in the repository lets it do, not whether that would work now. state and reason say that: a merge refuses a blocked pull, the owner's merge too, unless the owner forces it.

Properties

autoMerge

boolean

Set it to merge by itself once its checks pass, with dev.knotless.setAutoMerge: those who may merge it, in a repository that names runners, into a branch with no merge queue. Cancelling that, those and its author may. Absent is false.

base

requiredboolean

Change its target branch: those who may close it.

force

requiredboolean

Merge it past its checks: the owner alone.

head

requiredboolean

Change its head branch: its author.

merge

requiredboolean

Merge it: the owner and collaborators.

queue

requiredboolean

Put it in the merge queue or take it out: those who may merge it, in a repository whose runners land a queue, while the branch it lands on takes pulls through the queue or it is already queued.

rerun

requiredboolean

Ask the runners to run its checks again: the owner, in a repository that names runners.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • Merges a pull as the account logged in to this appview's pages.

  • Sets a pull to merge by itself once its checks pass, or cancels that, as the account logged in to this appview's pages.

  • A repository's merge queues.

  • A pull put in the merge queue of the branch it targets, taken out of it, or turned away by the runner that lands the queue.

  • A pull set to merge by itself once its checks pass, or that setting cancelled.