Skip to content

Commit 6059bf1

Browse files
authored
Update OpenAPI Description (#43575)
1 parent 284b843 commit 6059bf1

File tree

16 files changed

+310
-6
lines changed

16 files changed

+310
-6
lines changed

src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3435,6 +3435,15 @@
34353435
"additional-permissions": [],
34363436
"access": "write"
34373437
},
3438+
{
3439+
"category": "codespaces",
3440+
"slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user",
3441+
"subcategory": "codespaces",
3442+
"verb": "get",
3443+
"requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check",
3444+
"additional-permissions": [],
3445+
"access": "write"
3446+
},
34383447
{
34393448
"category": "codespaces",
34403449
"slug": "create-a-codespace-from-a-pull-request",

src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,12 @@
14521452
"verb": "get",
14531453
"requestPath": "/repos/{owner}/{repo}/codespaces/new"
14541454
},
1455+
{
1456+
"slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user",
1457+
"subcategory": "codespaces",
1458+
"verb": "get",
1459+
"requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check"
1460+
},
14551461
{
14561462
"slug": "list-repository-secrets",
14571463
"subcategory": "repository-secrets",

src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4247,6 +4247,17 @@
42474247
"server-to-server": false,
42484248
"additional-permissions": []
42494249
},
4250+
{
4251+
"category": "codespaces",
4252+
"slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user",
4253+
"subcategory": "codespaces",
4254+
"verb": "get",
4255+
"requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check",
4256+
"access": "write",
4257+
"user-to-server": true,
4258+
"server-to-server": false,
4259+
"additional-permissions": []
4260+
},
42504261
{
42514262
"category": "codespaces",
42524263
"slug": "create-a-codespace-from-a-pull-request",

src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,6 +1470,12 @@
14701470
"verb": "get",
14711471
"requestPath": "/repos/{owner}/{repo}/codespaces/new"
14721472
},
1473+
{
1474+
"slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user",
1475+
"subcategory": "codespaces",
1476+
"verb": "get",
1477+
"requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check"
1478+
},
14731479
{
14741480
"slug": "list-repository-secrets",
14751481
"subcategory": "repository-secrets",

src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4093,6 +4093,15 @@
40934093
"additional-permissions": [],
40944094
"access": "write"
40954095
},
4096+
{
4097+
"category": "codespaces",
4098+
"slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user",
4099+
"subcategory": "codespaces",
4100+
"verb": "get",
4101+
"requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check",
4102+
"additional-permissions": [],
4103+
"access": "write"
4104+
},
40964105
{
40974106
"category": "codespaces",
40984107
"slug": "create-a-codespace-from-a-pull-request",

src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,12 @@
15681568
"verb": "get",
15691569
"requestPath": "/repos/{owner}/{repo}/codespaces/new"
15701570
},
1571+
{
1572+
"slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user",
1573+
"subcategory": "codespaces",
1574+
"verb": "get",
1575+
"requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check"
1576+
},
15711577
{
15721578
"slug": "list-repository-secrets",
15731579
"subcategory": "repository-secrets",

src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5041,6 +5041,17 @@
50415041
"server-to-server": false,
50425042
"additional-permissions": []
50435043
},
5044+
{
5045+
"category": "codespaces",
5046+
"slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user",
5047+
"subcategory": "codespaces",
5048+
"verb": "get",
5049+
"requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check",
5050+
"access": "write",
5051+
"user-to-server": true,
5052+
"server-to-server": false,
5053+
"additional-permissions": []
5054+
},
50445055
{
50455056
"category": "codespaces",
50465057
"slug": "create-a-codespace-from-a-pull-request",

src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,6 +1586,12 @@
15861586
"verb": "get",
15871587
"requestPath": "/repos/{owner}/{repo}/codespaces/new"
15881588
},
1589+
{
1590+
"slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user",
1591+
"subcategory": "codespaces",
1592+
"verb": "get",
1593+
"requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check"
1594+
},
15891595
{
15901596
"slug": "list-repository-secrets",
15911597
"subcategory": "repository-secrets",

src/github-apps/lib/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@
6060
"2022-11-28"
6161
]
6262
},
63-
"sha": "ffaf232180dbaff57ce08fa5490df44bbc606501"
63+
"sha": "2b0299e5e69c42a2e28b40344541fe085a1ca617"
6464
}

src/rest/data/fpt-2022-11-28/schema.json

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160697,6 +160697,126 @@
160697160697
}
160698160698
]
160699160699
},
160700+
{
160701+
"serverUrl": "https://api.github.com",
160702+
"verb": "get",
160703+
"requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check",
160704+
"title": "Check if permissions defined by a devcontainer have been accepted by the authenticated user",
160705+
"category": "codespaces",
160706+
"subcategory": "codespaces",
160707+
"parameters": [
160708+
{
160709+
"name": "owner",
160710+
"description": "<p>The account owner of the repository. The name is not case sensitive.</p>",
160711+
"in": "path",
160712+
"required": true,
160713+
"schema": {
160714+
"type": "string"
160715+
}
160716+
},
160717+
{
160718+
"name": "repo",
160719+
"description": "<p>The name of the repository without the <code>.git</code> extension. The name is not case sensitive.</p>",
160720+
"in": "path",
160721+
"required": true,
160722+
"schema": {
160723+
"type": "string"
160724+
}
160725+
},
160726+
{
160727+
"name": "ref",
160728+
"description": "<p>The git reference that points to the location of the devcontainer configuration to use for the permission check. The value of <code>ref</code> will typically be a branch name (<code>heads/BRANCH_NAME</code>). For more information, see \"<a href=\"https://git-scm.com/book/en/v2/Git-Internals-Git-References\">Git References</a>\" in the Git documentation.</p>",
160729+
"in": "query",
160730+
"required": true,
160731+
"schema": {
160732+
"type": "string",
160733+
"examples": [
160734+
"master"
160735+
]
160736+
}
160737+
},
160738+
{
160739+
"name": "devcontainer_path",
160740+
"description": "<p>Path to the devcontainer.json configuration to use for the permission check.</p>",
160741+
"in": "query",
160742+
"required": true,
160743+
"schema": {
160744+
"type": "string",
160745+
"examples": [
160746+
".devcontainer/example/devcontainer.json"
160747+
]
160748+
}
160749+
}
160750+
],
160751+
"bodyParameters": [],
160752+
"enabledForGitHubApps": true,
160753+
"codeExamples": [
160754+
{
160755+
"key": "default",
160756+
"request": {
160757+
"description": "Example",
160758+
"acceptHeader": "application/vnd.github.v3+json",
160759+
"parameters": {
160760+
"owner": "OWNER",
160761+
"repo": "REPO"
160762+
}
160763+
},
160764+
"response": {
160765+
"statusCode": "200",
160766+
"contentType": "application/json",
160767+
"description": "<p>Response when the permission check is successful</p>",
160768+
"example": {
160769+
"accepted": true
160770+
},
160771+
"schema": {
160772+
"title": "Codespaces Permissions Check",
160773+
"description": "Permission check result for a given devcontainer config.",
160774+
"type": "object",
160775+
"properties": {
160776+
"accepted": {
160777+
"description": "Whether the user has accepted the permissions defined by the devcontainer config",
160778+
"type": "boolean",
160779+
"examples": [
160780+
true
160781+
]
160782+
}
160783+
},
160784+
"required": [
160785+
"accepted"
160786+
]
160787+
}
160788+
}
160789+
}
160790+
],
160791+
"previews": [],
160792+
"descriptionHTML": "<p>Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.</p>\n<p>You must authenticate using an access token with the <code>codespace</code> scope to use this endpoint.</p>\n<p>GitHub Apps must have write access to the <code>codespaces</code> repository permission to use this endpoint.</p>",
160793+
"statusCodes": [
160794+
{
160795+
"httpStatusCode": "200",
160796+
"description": "<p>Response when the permission check is successful</p>"
160797+
},
160798+
{
160799+
"httpStatusCode": "401",
160800+
"description": "<p>Requires authentication</p>"
160801+
},
160802+
{
160803+
"httpStatusCode": "403",
160804+
"description": "<p>Forbidden</p>"
160805+
},
160806+
{
160807+
"httpStatusCode": "404",
160808+
"description": "<p>Resource not found</p>"
160809+
},
160810+
{
160811+
"httpStatusCode": "422",
160812+
"description": "<p>Validation failed, or the endpoint has been spammed.</p>"
160813+
},
160814+
{
160815+
"httpStatusCode": "503",
160816+
"description": "<p>Service unavailable</p>"
160817+
}
160818+
]
160819+
},
160700160820
{
160701160821
"serverUrl": "https://api.github.com",
160702160822
"verb": "post",

0 commit comments

Comments
 (0)