Skip to content

Commit c97af6f

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent 634bc4e commit c97af6f

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

content/changes/2015-11-11-protected-branches-api.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,21 @@ We're starting a preview period for the [protected branches](https://github.com/
1010
To protect a branch, make a `PATCH` request to the URL of the branch:
1111

1212
{:.terminal}
13-
curl "https://api.github.com/v3/repos/github/hubot/branches/master" \
13+
curl "https://api.github.com/repos/github/hubot/branches/master" \
1414
-XPATCH \
1515
-H 'Authorization: token TOKEN'
1616
-H "Accept: application/vnd.github.loki-preview" \
17-
-d "{\"protection\":{\"enabled\":true,\"required_status_checks\":{\"enforcement_level\":\"everyone\",\"contexts\":[\"required-status\"]}}}" \
17+
-d '{
18+
"protection": {
19+
"enabled": true,
20+
"required_status_checks": {
21+
"enforcement_level": "everyone",
22+
"contexts": [
23+
"required-status"
24+
]
25+
}
26+
}
27+
}'
1828

1929
#### How can I try it?
2030

@@ -26,4 +36,4 @@ application/vnd.github.loki-preview+json
2636

2737
Take a look at [the docs here](/v3/repos/#enabling-and-disabling-branch-protection).
2838

29-
If you have any questions, please [get in touch](https://github.com/contact?form%5Bsubject%5D=Protected+Branches+API+Preview).
39+
If you have any questions, please [get in touch](https://github.com/contact?form%5Bsubject%5D=Protected+Branches+API+Preview).

content/v3/repos.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Name | Type | Description
292292

293293
<a name="preview-period"></a>
294294

295-
The Protect Branch API is currently available for developers to preview.
295+
The Protected Branch API is currently available for developers to preview.
296296
During the preview period, the API may change without advance notice.
297297
Please see the [blog post](/changes/2015-11-11-protected-branches-api) for full details.
298298

@@ -313,7 +313,7 @@ Name | Type | Description
313313

314314
<a name="preview-period"></a>
315315

316-
The Protect Branch API is currently available for developers to preview.
316+
The Protected Branch API is currently available for developers to preview.
317317
During the preview period, the API may change without advance notice.
318318
Please see the [blog post](/changes/2015-11-11-protected-branches-api) for full details.
319319

@@ -341,15 +341,15 @@ The `required_status_checks` object must have the following keys:
341341
Name | Type | Description
342342
-----|------|-------------
343343
`enforcement_level`|`string` | **Required**. Who required status checks apply to. Options are `off`, `non_admins` or `everyone`.
344-
`contexts`|`array` | **Required**. The list of required status checks to require in order to merge into this branch
344+
`contexts`|`array` | **Required**. The list of status checks to require in order to merge into this branch
345345

346346
The `enforcement_level` key can have the following values:
347347

348348
Name | Description
349349
------|------------
350350
`off` | Turn off required status checks for this branch.
351351
`non_admins` | Required status checks will be enforced for non-admins.
352-
`everyone` | Required status checks will be enforced for everyone (including admins)
352+
`everyone` | Required status checks will be enforced for everyone (including admins).
353353

354354
#### Example
355355

0 commit comments

Comments
 (0)