8000 Sync changes from upstream repository · YouthLab/developer.github.com@c21631d · GitHub
[go: up one dir, main page]

Skip to content

Commit c21631d

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent ebd314d commit c21631d

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
kind: change
3+
title: Finalizing the Organization and Team Membership APIs
4+
created_at: 2014-09-16
5+
author_name: jakeboxer
6+
---
7+
8+
For the past few weeks, the new [Organization Membership][org-membership-api] and [Team Membership][team-membership-api] APIs have been available for early access via a preview media type. As of today, these APIs are stable and suitable for production use.
9+
10+
### Preview period ends on September 23
11+
12+
On September 23, 2014, these APIs will become official parts of the GitHub API v3. At that time, the preview media type will no longer be required to access these APIs.
13+
14+
### Reminder: Breaking change to legacy endpoint
15+
16+
The [breaking change to the "Add team member" endpoint][add-team-member] will also go into effect for all requests on **September 23, 2014**. At that time, if you use the [add team member][add-team-member] endpoint to add a user to a team and that user isn't already on another team in your organization, the request will fail. To avoid this, be sure to use the [add team membership][add-team-membership] endpoint.
17+
18+
### Addition to the Organization Membership API
19+
20+
Thanks to your feedback, we've updated the Organization Membership API to provide direct access to basic information about the organization whenever you fetch a [list of memberships][list-org-memberships] or a [single membership][get-org-membership].
21+
22+
If you have any questions or feedback, please [get in touch with us][contact]!
23+
24+
[contact]: https://github.com/contact?form[subject]=Organization+and+Team+Membership+APIs
25+
[org-membership-api]: /changes/2014-08-28-accepting-organization-invitations-from-the-api/
26+
[team-membership-api]: /changes/2014-08-05-team-memberships-api/
27+
[add-team-member]: /v3/orgs/teams/#add-team-member
28+
[add-team-membership]: /v3/orgs/teams/#add-team-membership
29+
[list-org-memberships]: /v3/orgs/members/#list-your-organization-memberships
30+
[get-org-membership]: /v3/orgs/members/#get-your-organization-membership

lib/resources.rb

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,13 +728,33 @@ def fetch_content(key)
728728
ACTIVE_ORG_MEMBERSHIP ||= {
729729
"url" => "https://api.github.com/user/memberships/orgs/octocat",
730730
"state" => "active",
731-
"organization_url" => "https://api.github.com/orgs/octocat"
731+
"organization_url" => "https://api.github.com/orgs/octocat",
732+
"organization" => {
733+
"login" => "octocat",
734+
"url" => "https://api.github.com/orgs/octocat",
735+
"id" => 1,
736+
"repos_url" => "https://api.github.com/users/octocat/repos",
737+
"events_url" => "https://api.github.com/users/octocat/events{/privacy}",
738+
"members_url" => "https://api.github.com/users/octocat/members{/member}",
739+
&q 8000 uot;public_members_url" => "https://api.github/com/users/octocat/public_members{/member}",
740+
"avatar_url" => "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"
741+
}
732742
}
733743

734744
PENDING_ORG_MEMBERSHIP ||= {
735745
"url" => "https://api.github.com/user/memberships/orgs/invitocat",
736746
"state" => "pending",
737-
"organization_url" => "https://api.github.com/orgs/invitocat"
747+
"organization_url" => "https://api.github.com/orgs/invitocat",
748+
"organization" => {
749+
"login" => "invitocat",
750+
"url" => "https://api.github.com/orgs/invitocat",
751+
"id" => 2,
752+
"repos_url" => "https://api.github.com/users/invitocat/repos",
753+
"events_url" => "https://api.github.com/users/invitocat/events{/privacy}",
754+
"members_url" => "https://api.github.com/users/invitocat/members{/member}",
755+
"public_members_url" => "https://api.github/com/users/invitocat/public_members{/member}",
756+
"avatar_url" => "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"
757+
}
738758
}
739759

740760
ORG_MEMBERSHIPS ||= [ACTIVE_ORG_MEMBERSHIP, PENDING_ORG_MEMBERSHIP]

0 commit comments

Comments
 (0)
0