From e1c14067be814c52a60e6ea2de0b19707eb734ec Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Fri, 28 Sep 2012 15:31:43 -0500 Subject: [PATCH 001/112] Reswizzle, stub Notifications docs --- content/v3/activity.md | 9 ++ content/v3/{ => activity}/events.md | 0 content/v3/{ => activity}/events/types.md | 0 content/v3/activity/notifications.md | 128 +++++++++++++++++++++ content/v3/{repos => activity}/starring.md | 0 content/v3/{repos => activity}/watching.md | 0 layouts/default.html | 20 ++-- 7 files changed, 148 insertions(+), 9 deletions(-) create mode 100644 content/v3/activity.md rename content/v3/{ => activity}/events.md (100%) rename content/v3/{ => activity}/events/types.md (100%) create mode 100644 content/v3/activity/notifications.md rename content/v3/{repos => activity}/starring.md (100%) rename content/v3/{repos => activity}/watching.md (100%) diff --git a/content/v3/activity.md b/content/v3/activity.md new file mode 100644 index 0000000000..865bed2251 --- /dev/null +++ b/content/v3/activity.md @@ -0,0 +1,9 @@ +--- +title: Activity | GitHub API +--- + +# Activity + +Placeholder for intro to Notifications, Starring, Watching, Events, +Following(?) and other stuffs + diff --git a/content/v3/events.md b/content/v3/activity/events.md similarity index 100% rename from content/v3/events.md rename to content/v3/activity/events.md diff --git a/content/v3/events/types.md b/content/v3/activity/events/types.md similarity index 100% rename from content/v3/events/types.md rename to content/v3/activity/events/types.md diff --git a/content/v3/activity/notifications.md b/content/v3/activity/notifications.md new file mode 100644 index 0000000000..4c4cff3c28 --- /dev/null +++ b/content/v3/activity/notifications.md @@ -0,0 +1,128 @@ +--- +title: Notifications | GitHub API +--- + +# Notifications API + +* TOC +{:toc} + +GitHub Notifications are powered by [watched repositories](/v3/repos/watching/). +Users receive notifications for discussions in repositories they watch +including: + +* Issues and their comments +* Pull Requests and their comments +* Comments on any commits + +Notifications are also sent for discussions in unwatched repositories when the +user is involved including: + +* **@mentions** +* Assignments +* Commits the user authors or commits +* Any discussion in which the user actively participates + + +## List your notifications + +List all notifications for the current user, grouped by repository. + + GET /notifications + +### Parameters + +all +: _Optional_ **boolean** `true` to show notifications marked as read. + +participating +: _Optional_ **boolean** `true` to show only notifications in which the user is +directly participating or mentioned. + + +## List your notifications in a repository + +List all notifications for the current user. + + GET /repos/:owner/:repo/notifications + +### Parameters + +all +: _Optional_ **boolean** `true` to show notifications marked as read. + +participating +: _Optional_ **boolean** `true` to show only notifications in which the user is +directly participating or mentioned. + +## Mark as read + +Marking a notification as "read" archives it removes it from the [default view +on GitHub.com](https://github.com/notifications). + + POST /notifications/mark_as_read + +### Parameters + +ids +: _Optional_ **Array(Number)** IDs of notifications to mark as read. If this +parameter is omitted, all notifications will be marked as read. + +## Mark notifications as read in a repository + +Marking all notification in a repository as "read" archives them removes them +from the [default view on GitHub.com](https://github.com/notifications). + + POST /repos/:owner/:repo/notifications/mark_as_read + +## Mute a thread + +Muting a thread prevents future notifications from being sent for a discussion +thread. + + POST /notifications/threads/:id/mute + +## Unmute a thread + +Muting a thread enables future notifications from being sent for a discussion +thread. + + POST /notifications/threads/:id/unmute + +## Settings + +Update the notification settings for the authenticated user. + + PATCH /notifications/settings + +### Parameters + +participating.email +: _Optional_ **boolean** `true` to receive participating notificationsn via +email. + +participating.web +: _Optional_ **boolean** `true` to receive participating notificationsn via +web. + +watching.email +: _Optional_ **boolean** `true` to receive watching notificationsn via +email. + +watching.web +: _Optional_ **boolean** `true` to receive watching notificationsn via +web. + + +## Organization email address settings + +Update the notification settings for the authenticated user. + + PATCH /orgs/:org/notifications/settings + +### Parameters + +email +: _Required_ **string** Email address to which to send notifications to the +authenticated user for discussions related to projects for this organization. + diff --git a/content/v3/repos/starring.md b/content/v3/activity/starring.md similarity index 100% rename from content/v3/repos/starring.md rename to content/v3/activity/starring.md diff --git a/content/v3/repos/watching.md b/content/v3/activity/watching.md similarity index 100% rename from content/v3/repos/watching.md rename to content/v3/activity/watching.md diff --git a/layouts/default.html b/layouts/default.html index b200be7e15..aef86b7655 100644 --- a/layouts/default.html +++ b/layouts/default.html @@ -42,13 +42,23 @@ From d668c7defb8d863ef03cea9437d451d42e8cb2e2 Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Thu, 29 Nov 2012 14:29:57 -0600 Subject: [PATCH 085/112] Gitignore API blog post --- .../2012-11-29-gitignore-templates.html | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 content/changes/2012-11-29-gitignore-templates.html diff --git a/content/changes/2012-11-29-gitignore-templates.html b/content/changes/2012-11-29-gitignore-templates.html new file mode 100644 index 0000000000..931e12b060 --- /dev/null +++ b/content/changes/2012-11-29-gitignore-templates.html @@ -0,0 +1,58 @@ +--- +kind: change +title: Gitignore Templates API +created_at: 2012-11-29 +author_name: pengwynn +--- + +We recently [made it easy][init-post] to initialize a repository when you create +it [via the API][repo-create]. One of the options you can pass when creating a +repository is `gitignore_template`. This value is the name of one of the +templates from the the public [GitHub .gitignore repository][templates-repo]. + +The [Gitignore Templates API][new-api] makes it easy to list those templates: + + curl https://api.github.com/gitignore/templates + + HTTP/1.1 200 OK + + [ + "Actionscript", + "Android", + "AppceleratorTitanium", + "Autotools", + "Bancha", + "C", + "C++", + ... + +If you'd like to view the source, you can also fetch a single template. + + curl -H 'Accept: application/vnd.github.raw' \ + https://api.github.com/gitignore/templates/Objective-C + + HTTP/1.1 200 OK + + # Xcode + .DS_Store + build/ + *.pbxuser + !default.pbxuser + *.mode1v3 + !default.mode1v3 + *.mode2v3 + !default.mode2v3 + *.perspectivev3 + !default.perspectivev3 + *.xcworkspace + !default.xcworkspace + xcuserdata + profile + *.moved-aside + DerivedData + .idea/ + +[init-post]: /changes/2012-9-28-auto-init-for-repositories/ +[repo-create]: /v3/repos/#create +[templates-repo]: https://github.com/github/gitignore +[new-api]: /v3/gitignore/ From 27e8e0d1373870d20fbf1fbc7dacaf908510a507 Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Sat, 1 Dec 2012 14:12:20 -0600 Subject: [PATCH 086/112] Document new Authorizations API params --- content/v3/oauth.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/content/v3/oauth.md b/content/v3/oauth.md index fa8936b586..b3e3b320c8 100644 --- a/content/v3/oauth.md +++ b/content/v3/oauth.md @@ -1,7 +1,3 @@ ---- -title: OAuth | GitHub API ---- - # OAuth * TOC @@ -198,8 +194,11 @@ access your own tokens, and only through Basic Authentication. ## Create a new authorization -Note: Authorizations created from the API will show up in the GitHub API -app. +If you need a small number of tokens, implementing the [web flow](#web-application-flow) +can be cumbersome. Instead, tokens can be created using the Authorizations API using +Basic Authentication. To create tokens for a particular OAuth application, you +must provide its client ID and secret, found on the OAuth application settings +page, linked from your [OAuth applications listing on GitHub](app-listing). POST /authorizations @@ -214,6 +213,14 @@ note note_url : _Optional_ **string** - A URL to remind you what app the OAuth token is for. +client_id +: _Optional_ **String** - The 20 character OAuth app client key for which to create the +token. + +client_secret +: _Optional_ **String** - The 40 character OAuth app client secret for which to create the +token. + <%= json :scopes => ["public_repo"], :note => 'admin script' %> ### Response @@ -263,6 +270,7 @@ You can only send one of these scope keys at a time. ## More Information + It can be a little tricky to get started with OAuth. Here are a few links that might be of help: @@ -274,3 +282,5 @@ links that might be of help: * [Ruby OmniAuth example](http://github.com/intridea/omniauth) * [Ruby Sinatra extension](http://github.com/atmos/sinatra_auth_github) * [Ruby Warden strategy](http://github.com/atmos/warden-github) + +[app-listing]: https://github.com/settings/applications From 0f58adaba594d7e6ddb9ff5c8e80edf42c541e18 Mon Sep 17 00:00:00 2001 From: technoweenie Date: Mon, 3 Dec 2012 08:47:45 -0700 Subject: [PATCH 087/112] user agent is required --- content/v3.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/v3.md b/content/v3.md index 86223fabe9..805a4194f7 100644 --- a/content/v3.md +++ b/content/v3.md @@ -315,6 +315,13 @@ share your client secret with anyone or include it in client-side browser code. Please [contact us](https://github.com/contact) to request a higher rate limit for your OAuth application. +## User Agent Required + +All API requests are required to send a valid User Agent string. This is +usually the HTTP client that you are using. If you are hitting the API without +authentication, we ask that you add some kind of identification to the UA. This +is so we can contact you if there are problems. + ## Conditional requests Most responses return `Last-Modified` and `Etag` headers. You can use the values From 30705a05d799bb3f4d1af24b558cf719d47b7969 Mon Sep 17 00:00:00 2001 From: technoweenie Date: Mon, 3 Dec 2012 09:08:51 -0700 Subject: [PATCH 088/112] some wiggle room --- content/v3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/v3.md b/content/v3.md index 805a4194f7..8e7475b9a5 100644 --- a/content/v3.md +++ b/content/v3.md @@ -317,7 +317,7 @@ for your OAuth application. ## User Agent Required -All API requests are required to send a valid User Agent string. This is +All API requests are encouraged to send a valid User Agent string. This is usually the HTTP client that you are using. If you are hitting the API without authentication, we ask that you add some kind of identification to the UA. This is so we can contact you if there are problems. From 96b1be1a2bf4258bce80ad7dcef6ade93042f667 Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Tue, 4 Dec 2012 12:15:43 -0600 Subject: [PATCH 089/112] Document new batch comments methods --- content/v3/issues.md | 2 +- content/v3/issues/comments.md | 22 ++++++++++++++++++++++ content/v3/pulls/comments.md | 23 +++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/content/v3/issues.md b/content/v3/issues.md index c918ecd0dd..497cf8593b 100644 --- a/content/v3/issues.md +++ b/content/v3/issues.md @@ -92,7 +92,7 @@ direction : `asc` or `desc`, default: `desc`. since -: _Optional_ **string** of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ +: _Optional_ **String** of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ ### Response diff --git a/content/v3/issues/comments.md b/content/v3/issues/comments.md index dc762e6a3b..f7f202521a 100644 --- a/content/v3/issues/comments.md +++ b/content/v3/issues/comments.md @@ -23,6 +23,28 @@ You can read more about the use of mime types in the API <%= headers 200, :pagination => true %> <%= json(:issue_comment) { |h| [h] } %> +## List comments in a repository + + GET /repos/:owner/:repo/issues/comments + +By default, Issue Comments are ordered by ascending ID. + +### Parameters + +sort +: _Optional_ **String** `created` or `updated` + +direction +: _Optional_ **String** `asc` or `desc`. Ignored without `sort` parameter. + +since +: _Optional_ **String** of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ + +### Response + +<%= headers 200 %> +<%= json(:pull_comment) { |h| [h] } %> + ## Get a single comment GET /repos/:owner/:repo/issues/comments/:id diff --git a/content/v3/pulls/comments.md b/content/v3/pulls/comments.md index f56a1606e6..54435a7fd2 100644 --- a/content/v3/pulls/comments.md +++ b/content/v3/pulls/comments.md @@ -25,6 +25,28 @@ types. You can read more about the use of mime types in the API <%= headers 200 %> <%= json(:pull_comment) { |h| [h] } %> +## List comments in a repository + + GET /repos/:owner/:repo/pulls/comments + +By default, Review Comments are ordered by ascending ID. + +### Parameters + +sort +: _Optional_ **String** `created` or `updated` + +direction +: _Optional_ **String** `asc` or `desc`. Ignored without `sort` parameter. + +since +: _Optional_ **String** of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ + +### Response + +<%= headers 200 %> +<%= json(:pull_comment) { |h| [h] } %> + ## Get a single comment GET /repos/:owner/:repo/pulls/comments/:number @@ -123,3 +145,4 @@ more about the use of mime types in the API [here](/v3/media/). application/vnd.github.VERSION.text+json application/vnd.github.VERSION.html+json application/vnd.github.VERSION.full+json + From a2209730aac16ca8d5b25a954c2d28e76d367ae9 Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Tue, 4 Dec 2012 12:29:38 -0600 Subject: [PATCH 090/112] Batch comments post --- .../2012-12-04-List-comments-for-repo.html | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 content/changes/2012-12-04-List-comments-for-repo.html diff --git a/content/changes/2012-12-04-List-comments-for-repo.html b/content/changes/2012-12-04-List-comments-for-repo.html new file mode 100644 index 0000000000..e3c981c9f4 --- /dev/null +++ b/content/changes/2012-12-04-List-comments-for-repo.html @@ -0,0 +1,21 @@ +--- +kind: change +title: Per-repository Review and Issue Comment listing +created_at: 2012-12-04 +author_name: pengwynn +--- + +You've always been able to grab all the commit comments for an entire +repository via the API, but to get Issue comments and Pull Request Review +Comments, you could only fetch the comments for a single Issue or Pull Request. + +Today, we're introducing two new methods to grab all Issue Comments and Review +Comments for a repository. + + # Grab all Issue Comments + curl https://api.github.com/repos/mathiasbynens/dotfiles/issues/comments + + # Grab all Review Comments + curl https://api.github.com/repos/mathiasbynens/dotfiles/pulls/comments + + From fb8ee0f4fb8e218b9b4e33fc2e2c73e6fd9e9f31 Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Tue, 4 Dec 2012 12:31:12 -0600 Subject: [PATCH 091/112] Headline style tweak --- static/shared/css/documentation.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/shared/css/documentation.css b/static/shared/css/documentation.css index f571401db0..1284e35db5 100644 --- a/static/shared/css/documentation.css +++ b/static/shared/css/documentation.css @@ -46,6 +46,8 @@ h2 { body.api .change h2.title { background: none; + line-height: 1.2em; + margin-bottom: 0; padding-left: 0; font-size:24px; } From 55745a3da74e62ab58dd53fc7a57ac8c124f891c Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Tue, 4 Dec 2012 12:34:43 -0600 Subject: [PATCH 092/112] Tweak to batch comments post --- content/changes/2012-12-04-List-comments-for-repo.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/changes/2012-12-04-List-comments-for-repo.html b/content/changes/2012-12-04-List-comments-for-repo.html index e3c981c9f4..228bdc849b 100644 --- a/content/changes/2012-12-04-List-comments-for-repo.html +++ b/content/changes/2012-12-04-List-comments-for-repo.html @@ -18,4 +18,9 @@ # Grab all Review Comments curl https://api.github.com/repos/mathiasbynens/dotfiles/pulls/comments +Check out the docs for sorting and filtering options: + +* [Issue comments](/v3/issues/comments/#list-comments-in-a-repository) +* [Review comments](/v3/pulls/comments/#list-comments-in-a-repository) + From f4889b9c2775b218df761dc2dc4b53ae928ffc33 Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Tue, 4 Dec 2012 16:17:14 -0600 Subject: [PATCH 093/112] Document missing search param --- content/v3/search.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/v3/search.md b/content/v3/search.md index 71c6171149..3ac0a9663b 100644 --- a/content/v3/search.md +++ b/content/v3/search.md @@ -60,6 +60,9 @@ Find users by keyword. keyword : Keyword search parameters +start_page +: _Optional_ Page number to fetch + <%= headers 200 %> <%= json(:user_search_results) %> From 8d1db918a929fbf3353c86b9540fef8fd8bc634b Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Wed, 5 Dec 2012 13:37:17 -0600 Subject: [PATCH 094/112] Update docs for gist fork, hook test name changes --- content/index.md | 24 ++++++++++++------------ content/v3/gists.md | 4 +++- content/v3/repos/hooks.md | 4 +++- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/content/index.md b/content/index.md index a9a95c47a1..f5515ce829 100644 --- a/content/index.md +++ b/content/index.md @@ -28,21 +28,21 @@ if you have problems. These changes are _not_ implemented, just planned for the next major API version. -* Standardize on existing `*_url` attributes for hypermedia. Remove all `_links` +* `[ ]` Standardize on existing `*_url` attributes for hypermedia. Remove all `_links` objects. -* The `/repos/:owner/:repo/hooks/:id/test` action becomes - `/repos/:owner/:repo/hooks/:id/tests`. -* The `/gists/:id/fork` action becomes `/gists/:id/forks`. -* Gist forks/history objects become separate API calls. -* Gist files object is not returned on Gist listings. -* Commit schema will change to be [more consistent](https://gist.github.com/3a2e5779588e21b0c0f3). -* `master_branch` becomes `default_branch`. -* `integrate_branch` on the [repo API](/v3/repos/#get) will no longer be +* `[✓]` The '/repos/:owner/:repo/hooks/:id/test' action becomes + '/repos/:owner/:repo/hooks/:id/tests'. +* `[✓]` The '/gists/:id/fork' action becomes '/gists/:id/forks'. +* `[ ]` Gist forks/history objects become separate API calls. +* `[ ]` Gist files object is not returned on Gist listings. +* `[ ]` Commit schema will change to be [more consistent](https://gist.github.com/3a2e5779588e21b0c0f3). +* `[ ]` `master_branch` becomes `default_branch`. +* `[ ]` `integrate_branch` on the [repo API](/v3/repos/#get) will no longer be returned. -* Use the `private` attribute when creating a private repository, +* `[ ]` Use the `private` attribute when creating a private repository, instead of setting `public` to false. -* Use JSON to POST to the "repos/:owner/:repo/forks" endpoint, instead of a query string. -* User Emails come back as a hash instead of a string. +* `[ ]` Use JSON to POST to the "repos/:owner/:repo/forks" endpoint, instead of a query string. +* `[ ]` User Emails come back as a hash instead of a string. {"email": "email@whatev.com", "state": "verified"} diff --git a/content/v3/gists.md b/content/v3/gists.md index a6dafd82ff..6b61cb7f96 100644 --- a/content/v3/gists.md +++ b/content/v3/gists.md @@ -158,7 +158,9 @@ including the filename with a null hash. ## Fork a gist - POST /gists/:id/fork + POST /gists/:id/forks + +**Note**: Previously `/gists/:id/fork` ### Response diff --git a/content/v3/repos/hooks.md b/content/v3/repos/hooks.md index 600e8c99e4..4d6472f851 100644 --- a/content/v3/repos/hooks.md +++ b/content/v3/repos/hooks.md @@ -177,7 +177,9 @@ legacy format): This will trigger the hook with the latest push to the current repository. - POST /repos/:owner/:repo/hooks/:id/test + POST /repos/:owner/:repo/hooks/:id/tests + +**Note**: Previously `/repos/:owner/:repo/hooks/:id/test` ### Response From 6ebc18c58c7b3b5e9f7e59afc2cbc02f95bcf210 Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Thu, 6 Dec 2012 17:20:23 -0600 Subject: [PATCH 095/112] Changes post for Authorizations API --- ...12-12-06-create-authorization-for-app.html | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 content/changes/2012-12-06-create-authorization-for-app.html diff --git a/content/changes/2012-12-06-create-authorization-for-app.html b/content/changes/2012-12-06-create-authorization-for-app.html new file mode 100644 index 0000000000..f95dbbe5fc --- /dev/null +++ b/content/changes/2012-12-06-create-authorization-for-app.html @@ -0,0 +1,38 @@ +--- +kind: change +title: Create an OAuth authorization for an app +created_at: 2012-12-06 +author_name: pengwynn +--- + +The [Authorizations API][oauth-api] is an easy way to create an OAuth +authorization using Basic Auth. Just POST your desired scopes and optional +note and you get a token back: + +
+    curl -u pengwynn -d '{"scopes": ["user", "gist"]}' \
+         https://api.github.com/authorizations
+
+ +This call creates a token for the authenticating user tied to a special "API" +OAuth application. + +We now support creating tokens for _your own OAuth application_ by passing your +twenty character `client_id` and forty character `client_secret` as found in +the settings page for your OAuth application. + + +
+    curl -u pengwynn -d '{ \
+                          "scopes": ["user", "gist"], \
+                          "client_id": "abcdeabcdeabcdeabcdeabcde" \
+                          "client_secret": "abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde" \
+                         }' \ '
+            https://api.github.com/authorizations
+
+ +No more implementing the [web flow][web-flow] just to get a token tied to your +app's rate limit. + +[oauth-api]: /v3/oauth/#oauth-authorizations-api +[web-flow]: /v3/oauth/#web-application-flow From 563eb5ed387760926ef0c511dbb3100beb74d9f6 Mon Sep 17 00:00:00 2001 From: Soon Van Date: Fri, 7 Dec 2012 23:31:52 -0500 Subject: [PATCH 096/112] MIME as the acronym is all caps --- content/v3/gists/comments.md | 10 +++++----- content/v3/git/blobs.md | 10 +++++----- content/v3/issues.md | 10 +++++----- content/v3/issues/comments.md | 10 +++++----- content/v3/pulls.md | 10 +++++----- content/v3/pulls/comments.md | 10 +++++----- content/v3/repos/comments.md | 10 +++++----- content/v3/repos/contents.md | 2 +- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/content/v3/gists/comments.md b/content/v3/gists/comments.md index 985b6e8e5b..459d132996 100644 --- a/content/v3/gists/comments.md +++ b/content/v3/gists/comments.md @@ -7,8 +7,8 @@ title: Gist Comments | GitHub API * TOC {:toc} -Gist Comments leverage [these](#custom-mime-types) custom mime types. -You can read more about the use of mime types in the API +Gist Comments leverage [these](#custom-mime-types) custom MIME types. +You can read more about the use of MIME types in the API [here](/v3/media/). ## List comments on a gist @@ -70,10 +70,10 @@ body <%= headers 204 %> -## Custom Mime Types +## Custom MIME Types -These are the supported mime types for gist comments. You can read more about the -use of mime types in the API [here](/v3/media/). +These are the supported MIME types for gist comments. You can read more about the +use of MIME types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/git/blobs.md b/content/v3/git/blobs.md index ad4b1d4753..5fdae7994d 100644 --- a/content/v3/git/blobs.md +++ b/content/v3/git/blobs.md @@ -12,8 +12,8 @@ for the blob API takes an encoding parameter that can be either `utf-8` or `base64`. If your data cannot be losslessly sent as a UTF-8 string, you can base64 encode it. -Blobs leverage [these](#custom-mime-types) custom mime types. You can -read more about the use of mime types in the API [here](/v3/media/). +Blobs leverage [these](#custom-mime-types) custom MIME types. You can +read more about the use of MIME types in the API [here](/v3/media/). ## Get a Blob @@ -38,10 +38,10 @@ read more about the use of mime types in the API [here](/v3/media/). :Location => "https://api.github.com/git/:owner/:repo/blob/:sha" %> <%= json :sha => "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" %> -## Custom Mime Types +## Custom MIME Types -These are the supported mime types for blobs. You can read more about the -use of mime types in the API [here](/v3/media/). +These are the supported MIME types for blobs. You can read more about the +use of MIME types in the API [here](/v3/media/). application/json application/vnd.github.VERSION.raw diff --git a/content/v3/issues.md b/content/v3/issues.md index 497cf8593b..1fc951d7e9 100644 --- a/content/v3/issues.md +++ b/content/v3/issues.md @@ -7,8 +7,8 @@ title: Issues | GitHub API * TOC {:toc} -Issues leverage [these](#custom-mime-types) custom mime types. You can -read more about the use of mime types in the API [here](/v3/media/). +Issues leverage [these](#custom-mime-types) custom MIME types. You can +read more about the use of MIME types in the API [here](/v3/media/). ## List issues @@ -187,10 +187,10 @@ Issue. Send an empty array (`[]`) to clear all Labels from the Issue. <%= headers 200 %> <%= json :issue %> -## Custom Mime Types +## Custom MIME Types -These are the supported mime types for issues. You can read more about the -use of mime types in the API [here](/v3/media/). +These are the supported MIME types for issues. You can read more about the +use of MIME types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/issues/comments.md b/content/v3/issues/comments.md index f7f202521a..842a3fa973 100644 --- a/content/v3/issues/comments.md +++ b/content/v3/issues/comments.md @@ -10,8 +10,8 @@ title: Issue Comments | GitHub API The Issue Comments API supports listing, viewing, editing, and creating comments on issues and pull requests. -Issue Comments leverage [these](#custom-mime-types) custom mime types. -You can read more about the use of mime types in the API +Issue Comments leverage [these](#custom-mime-types) custom MIME types. +You can read more about the use of MIME types in the API [here](/v3/media/). ## List comments on an issue @@ -96,10 +96,10 @@ body <%= headers 204 %> -## Custom Mime Types +## Custom MIME Types -These are the supported mime types for issue comments. You can read more -about the use of mime types in the API [here](/v3/media/). +These are the supported MIME types for issue comments. You can read more +about the use of MIME types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/pulls.md b/content/v3/pulls.md index 659e14d984..eb2cd4840e 100644 --- a/content/v3/pulls.md +++ b/content/v3/pulls.md @@ -11,8 +11,8 @@ The Pull Request API allows you to list, view, edit, create, and even merge pull requests. Comments on pull requests can be managed via the [Issue Comments API](/v3/issues/comments/). -Pull Requests leverage [these](#custom-mime-types) custom mime types. You -can read more about the use of mime types in the API +Pull Requests leverage [these](#custom-mime-types) custom MIME types. You +can read more about the use of MIME types in the API [here](/v3/media/). ## Link Relations @@ -190,10 +190,10 @@ commit\_message :message => 'Failure reason' %> -## Custom Mime Types +## Custom MIME Types -These are the supported mime types for pull requests. You can read more about the -use of mime types in the API [here](/v3/media/). +These are the supported MIME types for pull requests. You can read more about the +use of MIME types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/pulls/comments.md b/content/v3/pulls/comments.md index 54435a7fd2..d5bea9d546 100644 --- a/content/v3/pulls/comments.md +++ b/content/v3/pulls/comments.md @@ -12,8 +12,8 @@ diff. These are separate from Commit Comments (which are applied directly to a commit, outside of the Pull Request view), and Issue Comments (which do not reference a portion of the unified diff). -Pull Request Review Comments leverage [these](#custom-mime-types) custom mime -types. You can read more about the use of mime types in the API +Pull Request Review Comments leverage [these](#custom-mime-types) custom MIME +types. You can read more about the use of MIME types in the API [here](/v3/media/). ## List comments on a pull request @@ -136,10 +136,10 @@ body <%= headers 204 %> -## Custom Mime Types +## Custom MIME Types -These are the supported mime types for pull request comments. You can read -more about the use of mime types in the API [here](/v3/media/). +These are the supported MIME types for pull request comments. You can read +more about the use of MIME types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/repos/comments.md b/content/v3/repos/comments.md index 6d5ca7b14c..701c9c1d14 100644 --- a/content/v3/repos/comments.md +++ b/content/v3/repos/comments.md @@ -9,8 +9,8 @@ title: Repo Comments | GitHub API ## List commit comments for a repository -Commit Comments leverage [these](#custom-mime-types) custom mime types. You can -read more about the use of mime types in the API [here](/v3/media/). +Commit Comments leverage [these](#custom-mime-types) custom MIME types. You can +read more about the use of MIME types in the API [here](/v3/media/). Comments are ordered by ascending ID. @@ -101,10 +101,10 @@ body <%= headers 204 %> -## Custom Mime Types +## Custom MIME Types -These are the supported mime types for commit comments. You can read more -about the use of mime types in the API [here](/v3/media/). +These are the supported MIME types for commit comments. You can read more +about the use of MIME types in the API [here](/v3/media/). application/vnd.github-commitcomment.raw+json application/vnd.github-commitcomment.text+json diff --git a/content/v3/repos/contents.md b/content/v3/repos/contents.md index e19c2cf902..f62ab8e2f3 100644 --- a/content/v3/repos/contents.md +++ b/content/v3/repos/contents.md @@ -8,7 +8,7 @@ title: Repo Contents | GitHub API {:toc} These API methods let you retrieve the contents of files within a repository as -Base64 encoded content. See [Mime types](/v3/media/) for requesting raw or other formats. +Base64 encoded content. See [MIME types](/v3/media/) for requesting raw or other formats. ## Get the README From 31dfbeb75cb9b9eadcf962ccbec8fb91e0237a54 Mon Sep 17 00:00:00 2001 From: Soon Van Date: Sat, 8 Dec 2012 01:26:36 -0500 Subject: [PATCH 097/112] Update MIME references to media MIMEstream media declares war on self, needs updating the miscreant "MIME types" to more family friendly "media types". - Headings on such sections in sentence case to match majority - Links expanded from mere "these" to what sounds like a more contextually giving "these custom media types". Follow on from 119c0fb1da0e0ab0ecbf71b68006cceb675e7b4c --- content/v3/gists/comments.md | 10 +++++----- content/v3/git/blobs.md | 10 +++++----- content/v3/issues.md | 10 +++++----- content/v3/issues/comments.md | 10 +++++----- content/v3/pulls.md | 10 +++++----- content/v3/pulls/comments.md | 10 +++++----- content/v3/repos/comments.md | 10 +++++----- content/v3/repos/contents.md | 2 +- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/content/v3/gists/comments.md b/content/v3/gists/comments.md index 459d132996..c3014eda8a 100644 --- a/content/v3/gists/comments.md +++ b/content/v3/gists/comments.md @@ -7,8 +7,8 @@ title: Gist Comments | GitHub API * TOC {:toc} -Gist Comments leverage [these](#custom-mime-types) custom MIME types. -You can read more about the use of MIME types in the API +Gist Comments leverage [these custom media types](#custom-media-types). +You can read more about the use of media types in the API [here](/v3/media/). ## List comments on a gist @@ -70,10 +70,10 @@ body <%= headers 204 %> -## Custom MIME Types +## Custom media types -These are the supported MIME types for gist comments. You can read more about the -use of MIME types in the API [here](/v3/media/). +These are the supported media types for gist comments. You can read more about the +use of media types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/git/blobs.md b/content/v3/git/blobs.md index 5fdae7994d..a542ad81c0 100644 --- a/content/v3/git/blobs.md +++ b/content/v3/git/blobs.md @@ -12,8 +12,8 @@ for the blob API takes an encoding parameter that can be either `utf-8` or `base64`. If your data cannot be losslessly sent as a UTF-8 string, you can base64 encode it. -Blobs leverage [these](#custom-mime-types) custom MIME types. You can -read more about the use of MIME types in the API [here](/v3/media/). +Blobs leverage [these custom media types](#custom-media-types). You can +read more about the use of media types in the API [here](/v3/media/). ## Get a Blob @@ -38,10 +38,10 @@ read more about the use of MIME types in the API [here](/v3/media/). :Location => "https://api.github.com/git/:owner/:repo/blob/:sha" %> <%= json :sha => "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" %> -## Custom MIME Types +## Custom media types -These are the supported MIME types for blobs. You can read more about the -use of MIME types in the API [here](/v3/media/). +These are the supported media types for blobs. You can read more about the +use of media types in the API [here](/v3/media/). application/json application/vnd.github.VERSION.raw diff --git a/content/v3/issues.md b/content/v3/issues.md index 1fc951d7e9..c0a6fd4320 100644 --- a/content/v3/issues.md +++ b/content/v3/issues.md @@ -7,8 +7,8 @@ title: Issues | GitHub API * TOC {:toc} -Issues leverage [these](#custom-mime-types) custom MIME types. You can -read more about the use of MIME types in the API [here](/v3/media/). +Issues leverage [these custom media types](#custom-media-types). You can +read more about the use of media types in the API [here](/v3/media/). ## List issues @@ -187,10 +187,10 @@ Issue. Send an empty array (`[]`) to clear all Labels from the Issue. <%= headers 200 %> <%= json :issue %> -## Custom MIME Types +## Custom media types -These are the supported MIME types for issues. You can read more about the -use of MIME types in the API [here](/v3/media/). +These are the supported media types for issues. You can read more about the +use of media types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/issues/comments.md b/content/v3/issues/comments.md index 842a3fa973..222e755519 100644 --- a/content/v3/issues/comments.md +++ b/content/v3/issues/comments.md @@ -10,8 +10,8 @@ title: Issue Comments | GitHub API The Issue Comments API supports listing, viewing, editing, and creating comments on issues and pull requests. -Issue Comments leverage [these](#custom-mime-types) custom MIME types. -You can read more about the use of MIME types in the API +Issue Comments leverage [these custom media types](#custom-media-types). +You can read more about the use of media types in the API [here](/v3/media/). ## List comments on an issue @@ -96,10 +96,10 @@ body <%= headers 204 %> -## Custom MIME Types +## Custom media types -These are the supported MIME types for issue comments. You can read more -about the use of MIME types in the API [here](/v3/media/). +These are the supported media types for issue comments. You can read more +about the use of media types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/pulls.md b/content/v3/pulls.md index eb2cd4840e..53bfa0e706 100644 --- a/content/v3/pulls.md +++ b/content/v3/pulls.md @@ -11,8 +11,8 @@ The Pull Request API allows you to list, view, edit, create, and even merge pull requests. Comments on pull requests can be managed via the [Issue Comments API](/v3/issues/comments/). -Pull Requests leverage [these](#custom-mime-types) custom MIME types. You -can read more about the use of MIME types in the API +Pull Requests leverage [these custom media types](#custom-media-types). You +can read more about the use of media types in the API [here](/v3/media/). ## Link Relations @@ -190,10 +190,10 @@ commit\_message :message => 'Failure reason' %> -## Custom MIME Types +## Custom media types -These are the supported MIME types for pull requests. You can read more about the -use of MIME types in the API [here](/v3/media/). +These are the supported media types for pull requests. You can read more about the +use of media types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/pulls/comments.md b/content/v3/pulls/comments.md index d5bea9d546..eef44ff63d 100644 --- a/content/v3/pulls/comments.md +++ b/content/v3/pulls/comments.md @@ -12,8 +12,8 @@ diff. These are separate from Commit Comments (which are applied directly to a commit, outside of the Pull Request view), and Issue Comments (which do not reference a portion of the unified diff). -Pull Request Review Comments leverage [these](#custom-mime-types) custom MIME -types. You can read more about the use of MIME types in the API +Pull Request Review Comments leverage [these custom media +types](#custom-media-types). You can read more about the use of media types in the API [here](/v3/media/). ## List comments on a pull request @@ -136,10 +136,10 @@ body <%= headers 204 %> -## Custom MIME Types +## Custom media types -These are the supported MIME types for pull request comments. You can read -more about the use of MIME types in the API [here](/v3/media/). +These are the supported media types for pull request comments. You can read +more about the use of media types in the API [here](/v3/media/). application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json diff --git a/content/v3/repos/comments.md b/content/v3/repos/comments.md index 701c9c1d14..1bcc72e176 100644 --- a/content/v3/repos/comments.md +++ b/content/v3/repos/comments.md @@ -9,8 +9,8 @@ title: Repo Comments | GitHub API ## List commit comments for a repository -Commit Comments leverage [these](#custom-mime-types) custom MIME types. You can -read more about the use of MIME types in the API [here](/v3/media/). +Commit Comments leverage [these custom media types](#custom-media-types). You can +read more about the use of media types in the API [here](/v3/media/). Comments are ordered by ascending ID. @@ -101,10 +101,10 @@ body <%= headers 204 %> -## Custom MIME Types +## Custom media types -These are the supported MIME types for commit comments. You can read more -about the use of MIME types in the API [here](/v3/media/). +These are the supported media types for commit comments. You can read more +about the use of media types in the API [here](/v3/media/). application/vnd.github-commitcomment.raw+json application/vnd.github-commitcomment.text+json diff --git a/content/v3/repos/contents.md b/content/v3/repos/contents.md index f62ab8e2f3..2b8f0adbf1 100644 --- a/content/v3/repos/contents.md +++ b/content/v3/repos/contents.md @@ -8,7 +8,7 @@ title: Repo Contents | GitHub API {:toc} These API methods let you retrieve the contents of files within a repository as -Base64 encoded content. See [MIME types](/v3/media/) for requesting raw or other formats. +Base64 encoded content. See [media types](/v3/media/) for requesting raw or other formats. ## Get the README From 318a8ed91a4366e651b16469388c4baa3abba58f Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Sat, 8 Dec 2012 14:05:48 -0600 Subject: [PATCH 098/112] Add myself to the authors hash --- lib/resources.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/resources.rb b/lib/resources.rb index 4b17dffb59..b11846a0fa 100644 --- a/lib/resources.rb +++ b/lib/resources.rb @@ -29,7 +29,8 @@ module Helpers AUTHORS = { :technoweenie => '821395fe70906c8290df7f18ac4ac6cf', :pengwynn => '7e19cd5486b5d6dc1ef90e671ba52ae0', - :pezra => 'f38112009dc16547051c8ac246cee443' + :pezra => 'f38112009dc16547051c8ac246cee443', + :rick => 'a44d5abad6e86cff4e34d9f0839535c9' } DefaultTimeFormat = "%B %-d, %Y".freeze From 5e862fcf141528640f9242e66b372c88e5fddbf6 Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Sat, 8 Dec 2012 14:20:42 -0600 Subject: [PATCH 099/112] Draft changes article re: fork/source org repos --- ...urce-and-fork-repos-for-organizations.html | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 content/changes/2012-12-08-finding-source-and-fork-repos-for-organizations.html diff --git a/content/changes/2012-12-08-finding-source-and-fork-repos-for-organizations.html b/content/changes/2012-12-08-finding-source-and-fork-repos-for-organizations.html new file mode 100644 index 0000000000..fb3f45caab --- /dev/null +++ b/content/changes/2012-12-08-finding-source-and-fork-repos-for-organizations.html @@ -0,0 +1,22 @@ +--- +kind: change +title: Finding sources and fork repositories for organizations +created_at: 2012-12-08 +author_name: rick +--- + +We've made a couple of changes today to the Organization repositories +listing to bring it a bit closer to the functionality of the GitHub.com +Organization repositories tab. We now let you retrieve repositories +which are forks of another repo, as well as those repositories which +are sources (not forks). + + # Grab all fork Repositories for an Organization + curl "https://api.github.com/orgs/:org/repos?type=forks" + + # Grab all source Repositories for an Organization + curl "https://api.github.com/orgs/:org/repos?type=sources" + +Check out the docs for sorting and filtering options: + +* [Organization Repositories](/v3/repos/#list-organization-repositories) From cae12e2c64cb96e6bb9d85c86db41f45d93168c8 Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Sat, 8 Dec 2012 14:30:35 -0600 Subject: [PATCH 100/112] Add sources and forks to /orgs/:org/repos docs --- content/v3/repos.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/v3/repos.md b/content/v3/repos.md index 8a327e8b47..9269f0215e 100644 --- a/content/v3/repos.md +++ b/content/v3/repos.md @@ -50,7 +50,7 @@ List repositories for the specified org. ### Parameters type -: `all`, `public`, `member`, `private`. Default: `all`. +: `all`, `public`, `private`, `forks`, `sources`, `member`. Default: `all`. ### Response From c2d9d969f95d4abc989131a6b15dce59faff5cff Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Sat, 8 Dec 2012 15:06:45 -0600 Subject: [PATCH 101/112] Make a more useful commit message when publishing The message generation seems to work, but haven't tried pushing it through the actual publishing pipeline yet. /cc @pengwynn --- Rakefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index e936202c3a..dcf0dd24b3 100644 --- a/Rakefile +++ b/Rakefile @@ -5,8 +5,23 @@ task :compile do `nanoc compile` end +# prompt user for a commit message; default: HEAD commit 1-liner +def commit_message + last_commit = `git log -1 --pretty=format:"%s"`.chomp.strip + last_commit = 'Publishing developer content to GitHub pages.' if last_commit == '' + + print "Enter a commit message (default: '#{last_commit}): " + STDOUT.flush + mesg = STDIN.gets.chomp.strip + + mesg = last_commit if mesg == '' + mesg.gsub(/'/, '') # to allow this to be handed off via -m '#{message}' +end + desc "Publish to http://developer.github.com" task :publish => [:clean] do + mesg = commit_message + FileUtils.rm_r('output') if File.exist?('output') sh "nanoc compile" @@ -21,9 +36,9 @@ task :publish => [:clean] do tsha = `git write-tree`.strip puts "Created tree #{tsha}" if old_sha.size == 40 - csha = `echo 'boom' | git commit-tree #{tsha} -p #{old_sha}`.strip + csha = `git commit-tree #{tsha} -p #{old_sha} -m '#{mesg}'`.strip else - csha = `echo 'boom' | git commit-tree #{tsha}`.strip + csha = `git commit-tree #{tsha} -m '#{mesg}'`.strip end puts "Created commit #{csha}" puts `git show #{csha} --stat` From 8d10df48973786234793ce58cc5d2e8b8809b56e Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Sat, 8 Dec 2012 15:28:43 -0600 Subject: [PATCH 102/112] whitespace change to test rake publish changes --- ...12-12-08-finding-source-and-fork-repos-for-organizations.html | 1 + 1 file changed, 1 insertion(+) diff --git a/content/changes/2012-12-08-finding-source-and-fork-repos-for-organizations.html b/content/changes/2012-12-08-finding-source-and-fork-repos-for-organizations.html index fb3f45caab..c6af80d2c4 100644 --- a/content/changes/2012-12-08-finding-source-and-fork-repos-for-organizations.html +++ b/content/changes/2012-12-08-finding-source-and-fork-repos-for-organizations.html @@ -20,3 +20,4 @@ Check out the docs for sorting and filtering options: * [Organization Repositories](/v3/repos/#list-organization-repositories) + From 9e63c751cc6e5fc735874567b07a93991a8fae09 Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Sat, 8 Dec 2012 15:29:30 -0600 Subject: [PATCH 103/112] add a ' to message prompt --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index dcf0dd24b3..437e5d3d09 100644 --- a/Rakefile +++ b/Rakefile @@ -10,7 +10,7 @@ def commit_message last_commit = `git log -1 --pretty=format:"%s"`.chomp.strip last_commit = 'Publishing developer content to GitHub pages.' if last_commit == '' - print "Enter a commit message (default: '#{last_commit}): " + print "Enter a commit message (default: '#{last_commit}'): " STDOUT.flush mesg = STDIN.gets.chomp.strip From e8c023a6cf05e44946a3b45ff0cd15e0e2449522 Mon Sep 17 00:00:00 2001 From: vanstee Date: Sat, 8 Dec 2012 21:16:18 -0500 Subject: [PATCH 104/112] Fix formatting for objective-c heading --- content/v3/libraries.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/v3/libraries.md b/content/v3/libraries.md index 6eda0612a6..1d693d9f4f 100644 --- a/content/v3/libraries.md +++ b/content/v3/libraries.md @@ -59,6 +59,7 @@ GitHub v3 API. Builds are available in [Maven Central](http://search.maven.org/ [octonode]: https://github.com/pksunkara/octonode [gh3]: https://github.com/k33g/gh3 [github]: https://github.com/michael/github + ## Objective-C * [UAGithubEngine][uagithubengine] From bc681168b7f2651ced2771ee6402612a564305c7 Mon Sep 17 00:00:00 2001 From: Michael Hood Date: Sun, 9 Dec 2012 02:50:52 -0800 Subject: [PATCH 105/112] Fix broken links for Starring and Watching links in Activity. Corrects 404s introduced in e1c1406. --- content/v3/activity/starring.md | 2 +- content/v3/activity/watching.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/v3/activity/starring.md b/content/v3/activity/starring.md index 38cb24c383..ad6746a982 100644 --- a/content/v3/activity/starring.md +++ b/content/v3/activity/starring.md @@ -10,7 +10,7 @@ title: Repository Starring | GitHub API Repository Starring is a feature that lets users bookmark repositories. Stars are shown next to repositories to show an approximate level of interest. Stars have no effect on notifications or the activity feed. For that, see [Repository -Watching](/v3/repos/watching). +Watching](/v3/activity/watching). We recently [changed the way watching works](https://github.com/blog/1204-notifications-stars) on GitHub. Many 3rd diff --git a/content/v3/activity/watching.md b/content/v3/activity/watching.md index ccd6891a66..4ddbb8298f 100644 --- a/content/v3/activity/watching.md +++ b/content/v3/activity/watching.md @@ -9,7 +9,7 @@ title: Repository Watching | GitHub API Watching a Repository registers the user to receive notificactions on new discussions, as well as events in the user's activity feed. See [Repository -Starring](/v3/repos/starring) for simple repository bookmarks. +Starring](/v3/activity/starring) for simple repository bookmarks. We recently [changed the way watching works](https://github.com/blog/1204-notifications-stars) on GitHub. Until 3rd From 8c72fc3834e305fdf73264b8c33831a9e050fee5 Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Sun, 9 Dec 2012 15:50:48 -0600 Subject: [PATCH 106/112] Announce pagination works on org repos listings --- ...ation-repositories-results-now-paginate.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 content/changes/2012-12-09-organization-repositories-results-now-paginate.html diff --git a/content/changes/2012-12-09-organization-repositories-results-now-paginate.html b/content/changes/2012-12-09-organization-repositories-results-now-paginate.html new file mode 100644 index 0000000000..ddbe2297a1 --- /dev/null +++ b/content/changes/2012-12-09-organization-repositories-results-now-paginate.html @@ -0,0 +1,17 @@ +--- +kind: change +title: Pagination for Organization Repository lists now paginates properly +created_at: 2012-12-09 +author_name: rick +--- + +![](https://github-images.s3.amazonaws.com/skitch/seger-turn-the-page-20121209-154956.png) + +Improvements continue to the Organizations Repository listing endpoint. +Today we're improving pagination so that it works as documented. Now you +can actually use `page` and `per_page` query params, or, better still, use +the `Link` headers to navigate through the results space. + +The docs for Organization Repositories queries are still here: + +* [Organization Repositories](/v3/repos/#list-organization-repositories) From 7f91dfafdee593ad3142e8dbf591967f101f9fec Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Mon, 10 Dec 2012 08:14:30 -0600 Subject: [PATCH 107/112] Fix broken OAuth link Thanks @andrewschaaf --- content/v3/oauth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/v3/oauth.md b/content/v3/oauth.md index b3e3b320c8..5992164fb3 100644 --- a/content/v3/oauth.md +++ b/content/v3/oauth.md @@ -198,7 +198,7 @@ If you need a small number of tokens, implementing the [web flow](#web-applicati can be cumbersome. Instead, tokens can be created using the Authorizations API using Basic Authentication. To create tokens for a particular OAuth application, you must provide its client ID and secret, found on the OAuth application settings -page, linked from your [OAuth applications listing on GitHub](app-listing). +page, linked from your [OAuth applications listing on GitHub][app-listing]. POST /authorizations From 5319135b7fd8395d9b8b5d0b231f6e1f03edeb63 Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Mon, 10 Dec 2012 09:44:49 -0600 Subject: [PATCH 108/112] Diff and patch changes post --- ...2012-12-10-Diff-and-patch-media-types.html | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 content/changes/2012-12-10-Diff-and-patch-media-types.html diff --git a/content/changes/2012-12-10-Diff-and-patch-media-types.html b/content/changes/2012-12-10-Diff-and-patch-media-types.html new file mode 100644 index 0000000000..5345c9466f --- /dev/null +++ b/content/changes/2012-12-10-Diff-and-patch-media-types.html @@ -0,0 +1,34 @@ +--- +kind: change +title: Diff and patch media types +created_at: 2012-12-10 +author_name: pengwynn +--- + +Starting today, you can get `.diff` and `.patch` content directly from the API for the following resources: + +* [Commits][commits-get] +* [Commit comparisons][commits-compare] +* [Pull request][pulls] + +Simply use the same resource URL and send either `application/vnd.github.diff` or `application/vnd.github.patch` in the `Accept` header: + + curl -H "Accept: application/vnd.github.diff" https://api.github.com/repos/pengwynn/dotfiles/commits/aee60a4cd56fb4c6a50e60f17096fc40c0d4d72c + + diff --git a/tmux/tmux.conf.symlink b/tmux/tmux.conf.symlink + index 1f599cb..abaf625 100755 + --- a/tmux/tmux.conf.symlink + +++ b/tmux/tmux.conf.symlink + @@ -111,6 +111,7 @@ set-option -g base-index 1 + ## enable mouse + set-option -g mouse-select-pane on + set-option -g mouse-select-window on + +set-option -g mouse-resize-pane on + set-window-option -g mode-keys vi + set-window-option -g mode-mouse on + # set-window-option -g monitor-activity off + +[commits-get]: /v3/repos/commits/#get-a-single-commit +[commits-compare]: /v3/repos/commits/#compare-two-commits +[pulls]: /v3/pulls/#get-a-single-pull-request + From b0db9c86c6cb274c3557ec0e31d6603f3428a811 Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Mon, 10 Dec 2012 10:01:21 -0600 Subject: [PATCH 109/112] Update diff and patch media type docs --- content/v3/media.md | 16 ++++++++++++++++ content/v3/pulls.md | 2 ++ content/v3/repos/commits.md | 6 +++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/content/v3/media.md b/content/v3/media.md index 4cd96a86c2..e228b16d76 100644 --- a/content/v3/media.md +++ b/content/v3/media.md @@ -101,4 +101,20 @@ encoded string. This is the default if nothing is passed. Return the raw blob data. +## Commits, Commit comparison, and Pull Requests + +The Commit, Commit Comparison, and Pull Request resources support +[diff][git-diff] and [patch][git-patch] formats: + +### diff + + application/vnd.github.VERSION.diff + +### patch + + application/vnd.github.VERSION.patch + + [gfm]:http://github.github.com/github-flavored-markdown/ +[git-diff]: http://git-scm.com/docs/git-diff +[git-patch]: http://git-scm.com/docs/git-format-patch diff --git a/content/v3/pulls.md b/content/v3/pulls.md index 53bfa0e706..cbbcd126df 100644 --- a/content/v3/pulls.md +++ b/content/v3/pulls.md @@ -55,6 +55,8 @@ is `open`. <%= headers 200 %> <%= json :full_pull %> +Pass the appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + ## Create a pull request POST /repos/:owner/:repo/pulls diff --git a/content/v3/repos/commits.md b/content/v3/repos/commits.md index 05e1951013..bea243d67f 100644 --- a/content/v3/repos/commits.md +++ b/content/v3/repos/commits.md @@ -51,7 +51,9 @@ until <%= headers 200 %> <%= json(:full_commit) %> -Note: Diffs with binary data will have no 'patch' property. +Note: Diffs with binary data will have no 'patch' property. Pass the +appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and +patch formats. ## Compare two commits @@ -60,3 +62,5 @@ Note: Diffs with binary data will have no 'patch' property. ### Response <%= json :commit_comparison %> + +Pass the appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. From a095a360a6dc8a78cc72049c26588ce31b600918 Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Mon, 10 Dec 2012 10:55:07 -0600 Subject: [PATCH 110/112] prefer Link headers to, ahem, turn the page --- ...09-organization-repositories-results-now-paginate.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/changes/2012-12-09-organization-repositories-results-now-paginate.html b/content/changes/2012-12-09-organization-repositories-results-now-paginate.html index ddbe2297a1..3bf4d2770c 100644 --- a/content/changes/2012-12-09-organization-repositories-results-now-paginate.html +++ b/content/changes/2012-12-09-organization-repositories-results-now-paginate.html @@ -8,10 +8,12 @@ ![](https://github-images.s3.amazonaws.com/skitch/seger-turn-the-page-20121209-154956.png) Improvements continue to the Organizations Repository listing endpoint. -Today we're improving pagination so that it works as documented. Now you -can actually use `page` and `per_page` query params, or, better still, use -the `Link` headers to navigate through the results space. +Today we're improving pagination so that it works as documented. Now +you can expect Link headers to navigate through the results space, +regardless of what you send in the type parameter. The docs for Organization Repositories queries are still here: * [Organization Repositories](/v3/repos/#list-organization-repositories) + +**EDIT:** `Link` headers are our preferred navigation technique. \ No newline at end of file From 84f855fa844578905920a1fb973f2f0d174b6100 Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Mon, 10 Dec 2012 10:57:21 -0600 Subject: [PATCH 111/112] backtick all the things --- ...-12-09-organization-repositories-results-now-paginate.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/changes/2012-12-09-organization-repositories-results-now-paginate.html b/content/changes/2012-12-09-organization-repositories-results-now-paginate.html index 3bf4d2770c..9229478d5b 100644 --- a/content/changes/2012-12-09-organization-repositories-results-now-paginate.html +++ b/content/changes/2012-12-09-organization-repositories-results-now-paginate.html @@ -9,8 +9,8 @@ Improvements continue to the Organizations Repository listing endpoint. Today we're improving pagination so that it works as documented. Now -you can expect Link headers to navigate through the results space, -regardless of what you send in the type parameter. +you can expect `Link` headers to navigate through the results space, +regardless of what you send in the `type` parameter. The docs for Organization Repositories queries are still here: From d5a6a15b77748a3b89b125bf824548bc86fe596e Mon Sep 17 00:00:00 2001 From: Pascal Borreli Date: Mon, 10 Dec 2012 23:29:43 +0000 Subject: [PATCH 112/112] Fixed typos --- content/guides/getting-started.md | 2 +- content/v3/activity.md | 2 +- content/v3/activity/notifications.md | 2 +- content/v3/activity/settings.md | 8 ++++---- content/v3/activity/watching.md | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/content/guides/getting-started.md b/content/guides/getting-started.md index c8636b9293..8f83e75f87 100644 --- a/content/guides/getting-started.md +++ b/content/guides/getting-started.md @@ -303,7 +303,7 @@ find the next page and the last page of results. ### Creating an issue -Now that we've seen how to paginate lsits of issues, let's create an issue from +Now that we've seen how to paginate lists of issues, let's create an issue from the API. curl -i -H 'Authorization: token 5199831f4dd3b79e7c5b7e0ebe75d67aa66e79d4' \ diff --git a/content/v3/activity.md b/content/v3/activity.md index a1fccf0f60..b58eca92d7 100644 --- a/content/v3/activity.md +++ b/content/v3/activity.md @@ -18,7 +18,7 @@ have no effect on notifications or the activity feed. ## Watching -Watching a Repository registers the user to receive notificactions on new +Watching a Repository registers the user to receive notifications on new discussions, as well as events in the user's activity feed. ## Events diff --git a/content/v3/activity/notifications.md b/content/v3/activity/notifications.md index dde6f5d85b..a554d69725 100644 --- a/content/v3/activity/notifications.md +++ b/content/v3/activity/notifications.md @@ -200,7 +200,7 @@ subscribed thread. ignored -: **boolean** Deterimines if all notifications should be blocked from this +: **boolean** Determines if all notifications should be blocked from this thread. ### Response diff --git a/content/v3/activity/settings.md b/content/v3/activity/settings.md index e5f63d625b..3244ed67f1 100644 --- a/content/v3/activity/settings.md +++ b/content/v3/activity/settings.md @@ -20,19 +20,19 @@ Update the notification settings for the authenticated user. ### Parameters participating.email -: _Optional_ **boolean** `true` to receive participating notificationsn via +: _Optional_ **boolean** `true` to receive participating notifications via email. participating.web -: _Optional_ **boolean** `true` to receive participating notificationsn via +: _Optional_ **boolean** `true` to receive participating notifications via web. watching.email -: _Optional_ **boolean** `true` to receive watching notificationsn via +: _Optional_ **boolean** `true` to receive watching notifications via email. watching.web -: _Optional_ **boolean** `true` to receive watching notificationsn via +: _Optional_ **boolean** `true` to receive watching notifications via web. <%= json \ diff --git a/content/v3/activity/watching.md b/content/v3/activity/watching.md index 4ddbb8298f..072242a113 100644 --- a/content/v3/activity/watching.md +++ b/content/v3/activity/watching.md @@ -7,7 +7,7 @@ title: Repository Watching | GitHub API * TOC {:toc} -Watching a Repository registers the user to receive notificactions on new +Watching a Repository registers the user to receive notifications on new discussions, as well as events in the user's activity feed. See [Repository Starring](/v3/activity/starring) for simple repository bookmarks. @@ -61,7 +61,7 @@ subscribed repository. ignored -: **boolean** Deterimines if all notifications should be blocked from this +: **boolean** Determines if all notifications should be blocked from this repository. ### Response