CommitPreview
What a commit would do, without doing it — ?dry_run=true.
Shape
- allowedbooleanWhether the commit, sent as it is, would land.
authorCommitAuthor
- The CommitAuthor schema
- emailEmail (string)
- namestring
- branch_existsbooleanWhether
branchexists. Withstart_branch,falsemeans it will be created. pipelinesarray of PredictedPipelineThe pipelines this commit would start, as the branch's push triggers stand now.
- The PredictedPipeline schema
- namestring
- pipeline_idPipelineId (string · uuid) or nulloptionalThe pipeline, when it is one stored in the platform. A pipeline declared in a file under
.gitmoap/pipelines/has no id and is named by its file.
refusalsarray of RefusalEvery reason the commit would be refused, each on the field it is about.
- The Refusal schema
- codeRefusalCodePERMISSION_REQUIREDBRANCH_PROTECTEDAGENT_REFFOREIGN_AUTHORPRIVILEGED_PATHBRANCH_NOT_FOUNDSTART_BRANCH_NOT_FOUNDFILE_NOT_FOUNDREPOSITORY_EMPTYMR_NOT_OPENNOT_CONFLICTEDHEAD_MOVEDBRANCH_EXISTSFILE_CHANGEDFILE_EXISTSPATH_CONFLICTUNSUPPORTED_ENTRYNOTHING_TO_COMMITUNRESOLVEDNOT_IN_CONFLICTUNSUPPORTED_CONFLICTPUSH_RULE_VIOLATIONWhat kind of refusal this is. Closed: a client branches on it. The wire spelling is the
SCREAMING_SNAKEdomain code that leads an error's message, so a refusal returned as data and the same refusal returned as an error read the same. - messagestringWhat is wrong, in a sentence a person can act on.
- fieldstring or nulloptionalThe part of the request the refusal is about:
message,branch, oractions[i]for the i-th file change. - rulestring or nulloptionalThe push rule that refused, by its setting's name (
require_issue_reference), whencodeisPUSH_RULE_VIOLATION.
stalearray of StaleFileThe files that changed since the caller read them.
- The StaleFile schema
- pathstring
- current_blob_shaObjectId (string) or nulloptionalThe blob at the branch's head now. Absent when the file has been deleted.
last_commitCommitSummary or nulloptionalThe commit that last changed the file, when it was found in time.
- The CommitSummary schema
- author_namestringThe author's name as recorded in the commit — a git identity, not a gitmoap account.
- authored_atstringWhen the change was written, ISO 8601.
- committed_atstringWhen the commit was created, ISO 8601. Later than
authored_atafter a rebase or a cherry-pick; this is the time a "last updated" column should show. - shaCommitHash (string)The full commit SHA.
- short_shaShortCommitHash (string)The abbreviated SHA, as git chose to abbreviate it in this repository.
- titlestringThe commit message's first line.
- author_avatar_urlstring or nulloptionalThe author's avatar, when this instance serves avatars.
- author_emailEmail (string) or nulloptionalThe author's email as recorded in the commit. Absent when the commit records something that is not an email address; the commit still has its name and message, only no avatar.
- head_shaCommitHash (string) or nulloptionalThe head the commit would land on; absent for a repository's first commit.
Example
Synthesized example{
"allowed": false,
"author": {
"email": "lin@acme.example",
"name": "payments-api"
},
"branch_exists": false,
"pipelines": [
{
"name": "payments-api"
}
],
"refusals": [
{
"code": "PERMISSION_REQUIRED",
"message": "Pin a page's payload to the build that rendered it"
}
],
"stale": [
{
"path": "path-7b6f"
}
],
"head_sha": "4521b9e9ffc766db28b8d5935d790d7754823e79"
}
Graph
Used inside
No schema contains this one.
Used by
Sent by 0 operations
No operation takes it as a request body.
Returned by 1 operation