Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit267dc51

Browse files
committed
Merge pull request#637 from github/enterprise-2.3-release
[DO NOT MERGE] Enterprise 2.3 release
2 parentse0d6bc4 +40afb4f commit267dc51

File tree

10 files changed

+298
-2
lines changed

10 files changed

+298
-2
lines changed

‎Rakefile‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require_relative'lib/resources'
12
require'nanoc3/tasks'
23
require'tmpdir'
34

@@ -12,7 +13,13 @@ desc "Test the output"
1213
task:test=>[:clean,:remove_output_dir,:compile]do
1314
require'html/proofer'
1415
ignored_links=[%r{www.w3.org}]
15-
HTML::Proofer.new("./output",:href_ignore=>ignored_links).run
16+
latest_ent_version=GitHub::Resources::Helpers::CONTENT['LATEST_ENTERPRISE_VERSION']
17+
# swap versionless Enterprise articles with versioned paths
18+
href_swap={
19+
%r{help\.github\.com/enterprise/admin/}=>"help.github.com/enterprise/#{latest_ent_version}/admin/",
20+
%r{help\.github\.com/enterprise/user/}=>"help.github.com/enterprise/#{latest_ent_version}/user/"
21+
}
22+
HTML::Proofer.new("./output",:href_ignore=>ignored_links,:href_swap=>href_swap).run
1623
end
1724

1825
desc"Remove the output dir"

‎content/v3/enterprise/ldap.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: LDAP
99

1010
You can use the LDAP API to update account relationships between a GitHub Enterprise user and its linked LDAP entry or queue a new synchronization.
1111

12-
With the LDAP mapping endpoints, you're able to update the Distinguished Name (DN) that a user maps to. Note that the LDAPsyncendpoints are only effective if your GitHub Enterprise appliance has[LDAP Sync enabled](https://help.github.com/enterprise/2.1/admin/guides/user-management/using-ldap).
12+
With the LDAP mapping endpoints, you're able to update the Distinguished Name (DN) that a user maps to. Note that the LDAP endpoints are only effective if your GitHub Enterprise appliance has[LDAP Sync enabled](https://help.github.com/enterprise/admin/guides/user-management/using-ldap).
1313

1414
##Update LDAP mapping for a user
1515

‎content/v3/enterprise/orgs.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title:Organization Administration | GitHub API
3+
---
4+
5+
#Organization Administration
6+
7+
* TOC
8+
{:toc}
9+
10+
The Organization Administration API allows you to create organizations on a GitHub Enterprise appliance.*It is only available to[authenticated](/v3/#authentication) site administrators.* Normal users will receive a`403` response if they try to access it.
11+
12+
Prefix all the endpoints for this API with the following URL:
13+
14+
<preclass="terminal">
15+
http(s)://<em>hostname</em>/api/v3
16+
</pre>
17+
18+
##Create an organization
19+
20+
POST /admin/organizations
21+
22+
###Parameters
23+
24+
Name | Type | Description
25+
-----|------|--------------
26+
`login`|`string` |**Required.** The organization's username.
27+
`admin`|`string`|**Required.** The login of the user who will manage this organization.
28+
`profile_name`|`string` | The organization's display name.
29+
####Example
30+
31+
<%= json\
32+
:login => "github",
33+
:profile_name => "GitHub, Inc.",
34+
:admin => "monalisaoctocat"
35+
%>
36+
37+
###Response
38+
39+
<%= headers 201 %>
40+
<%= json:org %>

‎content/v3/orgs/migrations.md‎

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title:Migrations | GitHub API
3+
---
4+
5+
#Migrations
6+
7+
* TOC
8+
{:toc}
9+
10+
{{#tip}}
11+
12+
To access the Migrations API, you must provide a custom[media type](/v3/media) in the`Accept` header:
13+
14+
application/vnd.github.wyandotte-preview+json
15+
16+
{{/tip}}
17+
18+
##Start a migration
19+
20+
Initiates the generation of a migration archive.
21+
22+
POST /orgs/:org/migrations
23+
24+
###Parameters
25+
26+
Name | Type | Description
27+
--------|---------|--------------
28+
`repositories` |`array` of`strings` |**Required**. A list of arrays indicating which repositories should be migrated.
29+
`lock_repositories`|`boolean` | Indicates whether repositories should be locked (to prevent manipulation) while migrating data. Default:`false`.
30+
31+
###Example
32+
33+
<%= json\
34+
:repositories =>["octocat/Hello-World"],
35+
:lock_repositories => true
36+
%>
37+
38+
###Response
39+
40+
<%= headers 201 %>
41+
<%= json(:migrations) %>
42+
43+
##Get a list of migrations
44+
45+
Lists the most recent migrations.
46+
47+
GET /orgs/:org/migrations
48+
49+
###Response
50+
51+
<%= headers 200,:pagination => default_pagination_rels %>
52+
<%= json(:migrations) { |h|[h] } %>
53+
54+
##Get the status of a migration
55+
56+
Fetches the status of a migration.
57+
58+
GET /orgs/:org/migrations/:id
59+
60+
###Response
61+
62+
The`state` of a migration can be one of the following values:
63+
64+
*`pending`, which means the migration hasn't started yet.
65+
*`exporting`, which means the migration is in progress.
66+
*`exported`, which means the migration finished successfully.
67+
*`failed`, which means the migration failed.
68+
69+
<%= headers 200 %>
70+
<%= json(:migrations) { |h| h['state'] = 'exported'; h } %>
71+
72+
##Download a migration archive
73+
74+
Fetches the URL to a migration archive.
75+
76+
GET /orgs/:org/migrations/:id/archive
77+
78+
###Response
79+
80+
<%= headers 302 %>
81+
<preclass="body-response"><code>
82+
https://s3.amazonaws.com/github-cloud/migration/79/67?response-content-disposition=filename%3D0b989ba4-242f-11e5-81e1.tar.gz&response-content-type=application/x-gzip
83+
</code></pre>
84+
85+
##Delete a migration archive
86+
87+
Deletes a previous migration archive. Migration archives are automatically deleted after seven days.
88+
89+
DELETE /orgs/:org/migrations/:id/archive
90+
91+
###Response
92+
93+
<%= headers 204 %>
94+
95+
##Unlock a repository
96+
97+
Unlocks a repository that was locked for migration. You should unlock each migrated repository and[delete them](/v3/repos/#delete-a-repository) when the migration is complete and you no longer need the source data.
98+
99+
DELETE /orgs/:org/migrations/:id/repos/:repo_name/lock
100+
101+
###Response
102+
103+
<%= headers 204 %>

‎content/v3/orgs/teams.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ the org that the team is associated with, or a maintainer of the team.
132132
In order to list members in a team, the team must be visible to the
133133
authenticated user.
134134

135+
{{#enterprise-only}}
136+
137+
<%= fetch_content(:if_site_admin) %>
138+
you will be able to list all members for the team.
139+
140+
{{/enterprise-only}}
141+
135142
GET /teams/:id/members
136143

137144
Name | Type | Description
@@ -362,6 +369,13 @@ team.
362369

363370
GET /teams/:id/repos
364371

372+
{{#enterprise-only}}
373+
374+
<%= fetch_content(:if_site_admin) %>
375+
you will be able to list all repositories for the team.
376+
377+
{{/enterprise-only}}
378+
365379
###Response
366380

367381
<%= headers 200,:pagination => default_pagination_rels %>

‎content/v3/repos.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ Note: Pagination is powered exclusively by the `since` parameter.
6868
Use the[Link header](/v3/#link-header) to get the URL for the next page of
6969
repositories.
7070

71+
{{#enterprise-only}}
72+
73+
If you are an[authenticated](/v3/#authentication) site administrator for your Enterprise instance,
74+
you will be able to list all repositories including private repositories.
75+
76+
###Parameters
77+
78+
Name | Type | Description
79+
-----|------|--------------
80+
`visibility`|`string`| To include private repositories as well set to`all`. Default:`public`
81+
82+
{{/enterprise-only}}
83+
7184
GET /repositories
7285

7386
###Parameters

‎content/v3/users/administration.md‎

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,76 @@ Prefix all the endpoints for this API with the following URL:
1515
http(s)://<em>hostname</em>/api/v3
1616
</pre>
1717

18+
##Create a new user
19+
20+
POST /admin/users
21+
22+
###Parameters
23+
24+
Name | Type | Description
25+
-----|------|--------------
26+
`login`|`string` |**Required.** The user's username.
27+
`email`|`string` |**Required.** The user's email address.
28+
29+
####Example
30+
31+
<%= json\
32+
:login => "monalisa",
33+
:email => "octocat@github.com"
34+
%>
35+
36+
###Response
37+
38+
<%= headers 201 %>
39+
<%= json:user %>
40+
41+
##Rename an existing user
42+
43+
PATCH /admin/users/:user_id
44+
45+
###Parameters
46+
47+
Name | Type | Description
48+
-----|------|--------------
49+
`login`|`string` |**Required.** The user's new username.
50+
51+
####Example
52+
53+
<%= json\
54+
:login => "thenewmonalisa"
55+
%>
56+
57+
###Response
58+
59+
<%= headers 202 %>
60+
<%= json\
61+
:message => "Job queued to rename user. It may take a few minutes to complete.",
62+
:url => "https://api.github.com/user/1"
63+
%>
64+
65+
##Create an impersonation OAuth token
66+
67+
POST /admin/users/:user_id/authorizations
68+
69+
###Parameters
70+
71+
Name | Type | Description
72+
---- | ---- | -------------
73+
`scopes`|`array` | A list of[scopes](/v3/oauth/#scopes).
74+
75+
###Response
76+
77+
<%= headers 201 %>
78+
<%= json(:oauth_access) %>
79+
80+
##Delete an impersonation OAuth token
81+
82+
DELETE /admin/users/:user_id/authorizations
83+
84+
###Response
85+
86+
<%= headers 204 %>
87+
1888
##Promote an ordinary user to a site administrator
1989

2090
PUT /users/:username/site_admin
@@ -66,3 +136,23 @@ If your GitHub Enterprise appliance has [LDAP Sync with Active Directory LDAP se
66136
###Response
67137

68138
<%= headers 204 %>
139+
140+
##List all public keys
141+
142+
GET /admin/keys
143+
144+
###Response
145+
146+
<%= headers 200,:pagination => default_pagination_rels %>
147+
<%= json(:all_keys) { |public_key, deploy_key|\
148+
[public_key, deploy_key.merge("id" => "2", "url" => "https://api.github.com/repos/octocat/Hello-World/keys/2")]\
149+
} %>
150+
151+
152+
##Delete a public key
153+
154+
DELETE /admin/keys/1
155+
156+
###Response
157+
158+
<%= headers 204 %>

‎layouts/sidebar.html‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ <h3><a href="#" class="js-expand-btn collapsed arrow-btn" data-proofer-ignore></
6464
<h3><ahref="#"class="js-expand-btn collapsed arrow-btn"data-proofer-ignore></a><ahref="/v3/orgs/">Organizations</a></h3>
6565
<ulclass="js-guides">
6666
<li><ahref="/v3/orgs/members/">Members</a></li>
67+
<li><ahref="/v3/orgs/migrations/">Migrations</a></li>
6768
<li><ahref="/v3/orgs/teams/">Teams</a></li>
6869
<li><ahref="/v3/orgs/hooks/">Webhooks</a></li>
6970
</ul>
@@ -120,6 +121,7 @@ <h3><a href="#" class="js-expand-btn collapsed arrow-btn" data-proofer-ignore></
120121
<li><ahref="/v3/enterprise/license/">License</a></li>
121122
<li><ahref="/v3/enterprise/management_console/">Management Console</a></li>
122123
<li><ahref="/v3/enterprise/search_indexing/">Search Indexing</a></li>
124+
<li><ahref="/v3/enterprise/orgs/">Organization Administration</a></li>
123125
</ul>
124126
</li>
125127
</ul>

‎lib/resources.rb‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def webhook_payload(event_name)
122122

123123
CONTENT ||={
124124
'LATEST_ENTERPRISE_VERSION'=>'2.3',
125+
'IF_SITE_ADMIN'=>"If you are an [authenticated](/v3/#authentication) site administrator for your Enterprise instance,",
125126
"PUT_CONTENT_LENGTH"=>"Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see\"[HTTP verbs](/v3/#http-verbs).\"",
126127
"OPTIONAL_PUT_CONTENT_LENGTH"=>"Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see\"[HTTP verbs](/v3/#http-verbs).\"",
127128
"ORG_HOOK_CONFIG_HASH"=>
@@ -229,13 +230,23 @@ def fetch_content(key)
229230
"created_at"=>"2014-12-10T15:53:42Z",
230231
"read_only"=>true
231232

233+
PUBLIC_KEY_DETAIL ||=PUBLIC_KEY.merge \
234+
"user_id"=>232,
235+
"repository_id"=>nil
236+
232237
DEPLOY_KEY ||=SIMPLE_PUBLIC_KEY.merge \
233238
"url"=>"https://api.github.com/repos/octocat/Hello-World/keys/1",
234239
"title"=>"octocat@octomac",
235240
"verified"=>true,
236241
"created_at"=>"2014-12-10T15:53:42Z",
237242
"read_only"=>true
238243

244+
DEPLOY_KEY_DETAIL ||=PUBLIC_KEY.merge \
245+
"user_id"=>nil,
246+
"repository_id"=>2333
247+
248+
ALL_KEYS ||=[PUBLIC_KEY_DETAIL,DEPLOY_KEY_DETAIL]
249+
239250
SIMPLE_REPO ||={
240251
"id"=>1296269,
241252
"owner"=>USER,
@@ -872,6 +883,17 @@ def fetch_content(key)
872883
ACTIVE_ORG_MEMBERSHIPS ||=[ACTIVE_ADMIN_ORG_MEMBERSHIP]
873884
PENDING_ORG_MEMBERSHIPS ||=[PENDING_ADMIN_ORG_MEMBERSHIP]
874885

886+
MIGRATIONS ||={
887+
"id"=>79,
888+
"guid"=>"0b989ba4-242f-11e5-81e1-c7b6966d2516",
889+
"state"=>"pending",
890+
"lock_repositories"=>true,
891+
"url"=>"https://api.github.com/orgs/octo-org/migrations/79",
892+
"created_at"=>"2015-07-06T15:33:38-07:00",
893+
"updated_at"=>"2015-07-06T15:33:38-07:00",
894+
"repositories"=>[REPO]
895+
}
896+
875897
LABEL ||={
876898
"url"=>"https://api.github.com/repos/octocat/Hello-World/labels/bug",
877899
"name"=>"bug",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp