GitHub v3 REST API

Branch Protection

object

Branch Protection

urlstring
enabledboolean
required_status_checksobject

Protected Branch Required Status Check

Show Child Parameters
enforce_adminsobject

Protected Branch Admin Enforced

Show Child Parameters
required_pull_request_reviewsobject

Protected Branch Pull Request Review

Show Child Parameters
restrictionsobject

Branch Restriction Policy

Show Child Parameters
required_linear_historyobject
Show Child Parameters
allow_force_pushesobject
Show Child Parameters
allow_deletionsobject
Show Child Parameters
required_conversation_resolutionobject
Show Child Parameters
namestring

Example:"branch/with/protection"

protection_urlstring

Example:"https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection"

required_signaturesobject
Show Child Parameters
Example

Short Branch

object

Short Branch

namestringrequired
commitobjectrequired
Show Child Parameters
protectedbooleanrequired
protectionobject

Branch Protection

Show Child Parameters
protection_urlstring(uri)
Example

Git User

object

Metaproperties for Git author/committer information.

namestring

Example:"Chris Wanstrath"

emailstring

Example:"chris@ozmm.org"

datestring

Example:"2007-10-29T02:42:39.000-07:00"

Example

Verification

object
verifiedbooleanrequired
reasonstringrequired
payloadstringrequired
signaturestringrequired
Example

Diff Entry

object

Diff Entry

shastringrequired

Example:bbcd538c8e72b8c175046e27cc8f907076331401

filenamestringrequired

Example:file1.txt

statusstringrequired

Allowed values:addedremovedmodifiedrenamedcopiedchangedunchanged

Example:added

additionsintegerrequired

Example:103

deletionsintegerrequired

Example:21

changesintegerrequired

Example:124

blob_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt

raw_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt

contents_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e

patchstring

Example:@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test

previous_filenamestring

Example:file.txt

Example