Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit a9eea74

Browse files
committed
Merge branch 'master' into watcher-changes
2 parents 596aa0d + a241b88 commit a9eea74

File tree

10 files changed

+96
-3
lines changed

10 files changed

+96
-3
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ gem 'builder'
1212

1313
group :development do
1414
gem 'adsf'
15+
gem 'fssm'
1516
end

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ GEM
1010
cri (2.3.0)
1111
colored (>= 1.2)
1212
ffi (1.0.11)
13+
fssm (0.2.9)
1314
kramdown (0.13.7)
1415
mime-types (1.18)
1516
nanoc (3.3.7)
@@ -31,6 +32,7 @@ DEPENDENCIES
3132
adsf
3233
builder
3334
coderay
35+
fssm
3436
kramdown (~> 0.13.2)
3537
mime-types (~> 1.16)
3638
nanoc (~> 3.3.7)

content/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ The API is expected to be finalized Real Soon Now.
4848

4949
### Breaking Beta Changes
5050

51+
##### August 30, 2012
52+
* Added `repo:status` scope
53+
* Added Status API
54+
5155
##### August 7, 2012
5256
* Clarified watching/stargazing
5357

content/v3/markdown.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Markdown Rendering | GitHub API
44

55
# Markdown Rendering API
66

7-
## Render an arbritrary Markdown document
7+
## Render an arbitrary Markdown document
88

99
POST /markdown
1010

content/v3/oauth.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ public\_repo
146146
repo
147147
: Read/write access to public and private repos and organizations.
148148

149+
repo:status
150+
: Read/write access to public and private repo statuses. Does **not**
151+
include access to code - use `repo` for that.
152+
149153
delete\_repo
150154
: Delete access to adminable repositories.
151155

content/v3/orgs/teams.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ NOTE: This does not delete the user, it just remove them from the team.
187187

188188
In order to add a repo to a team, the authenticated user must be an
189189
owner of the org that the team is associated with. Also, the repo must
190-
be owned by the organization, or a direct for of a repo owned by the
190+
be owned by the organization, or a direct form of a repo owned by the
191191
organization.
192192

193193
PUT /teams/:id/repos/:user/:repo

content/v3/repos/commits.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ path
2424
: _Optional_ **string** - Only commits containing this file path
2525
will be returned.
2626

27+
author
28+
: _Optional_ **string** - GitHub login, name, or email by which to filter by
29+
commit author
30+
2731
### Response
2832

2933
<%= headers 200 %>

content/v3/repos/statuses.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Statuses | GitHub API
3+
---
4+
5+
# Repo Statuses API
6+
7+
The Status API allows external services to mark commits with a success,
8+
failure, error, or pending `state`, which is then reflected in pull requests
9+
involving those commits.
10+
11+
Statuses can also include an optional `description` and `url`, and
12+
we highly recommend providing them as they make statuses much more
13+
useful in the GitHub UI.
14+
15+
As an example, one common use is for continuous integration
16+
services to mark commits as passing or failing builds using Status. The
17+
`target_url` would be the full url to the build output, and the
18+
description would be the high level summary of what happened with the
19+
build.
20+
21+
Note that the `repo:status` [OAuth scope](/v3/oauth/#scopes) grants targeted
22+
access to Statuses **without** also granting access to repo code, while the
23+
`repo` scope grants permission to code as well as statuses.
24+
25+
## List Statuses for a specific SHA
26+
27+
GET /repos/:user/:repo/statuses/:sha
28+
29+
### Parameters
30+
31+
sha
32+
: _Required_ **string** - Sha to list the statuses from
33+
34+
### Response
35+
36+
<%= headers 200 %>
37+
<%= json(:status) { |h| [h] } %>
38+
39+
## Create a Status
40+
41+
POST /repos/:user/:repo/statuses/:sha
42+
43+
### Parameters
44+
45+
state
46+
: _Required_ **string** State of the status - can be one of `pending`,
47+
`success`, `error`, or `failure`.
48+
49+
target_url
50+
: _Optional_ **string** Target url to associate with this status. This
51+
URL will be linked from the GitHub UI to allow users to easily see the
52+
'source' of the Status.
53+
54+
: For example, if your Continuous Integration system is posting build
55+
status, you would want to provide the deep link for the build output for
56+
this specific sha - `http://ci.example.com/johndoe/my-repo/builds/sha`.
57+
58+
description
59+
: _Optional_ **string** Short description of the status
60+
61+
### Response
62+
63+
<%= headers 201,
64+
:Location =>
65+
'https://api.github.com/repos/octocat/example/statuses/1' %>
66+
<%= json :status %>

layouts/default.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ <h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/repos/">R
9494
<li><a href="/v3/repos/downloads/">Downloads</a></li>
9595
<li><a href="/v3/repos/forks/">Forks</a></li>
9696
<li><a href="/v3/repos/keys/">Keys</a></li>
97-
<li><a href="/v3/repos/watching/">Watching</a></li>
9897
<li><a href="/v3/repos/hooks/">Hooks</a></li>
9998
<li><a href="/v3/repos/merging/">Merging</a></li>
99+
<li><a href="/v3/repos/statuses/">Statuses</a></li>
100+
<li><a href="/v3/repos/watching/">Watching</a></li>
100101
</ul>
101102
</li>
102103
<li class="js-topic">

lib/resources.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,17 @@ def text_html(response, status, head = {})
935935
"sha" => "3d21ec53a331a6f037a91c368710b99387d012c1"
936936
}
937937

938+
STATUS = {
939+
"created_at" => "2012-07-20T01:19:13Z",
940+
"updated_at" => "2012-07-20T01:19:13Z",
941+
"state" => "success",
942+
"target_url" => "https://ci.example.com/1000/output",
943+
"description" => "Build has completed successfully",
944+
"id" => 1,
945+
"url" => "https://api.github.com/repos/octocat/example/statuses/1",
946+
"creator" => USER
947+
}
948+
938949
BLOB = {
939950
:content => "Content of the blob",
940951
:encoding => "utf-8",

0 commit comments

Comments
 (0)