Skip to content

Commit 271e7c3

Browse files
Update OpenAPI Descriptions (#25706)
* Update OpenAPI Descriptions * Add decorated OpenAPI schema files Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com> Co-authored-by: Ethan P <56270045+ethanpalm@users.noreply.github.com>
1 parent 58fcce0 commit 271e7c3

File tree

3 files changed

+319
-0
lines changed

3 files changed

+319
-0
lines changed

lib/rest/static/apps/enabled-for-apps.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,16 @@
256256
"verb": "put",
257257
"requestPath": "/repos/{owner}/{repo}/actions/permissions"
258258
},
259+
{
260+
"slug": "get-the-level-of-access-for-workflows-outside-of-the-repository",
261+
"verb": "get",
262+
"requestPath": "/repos/{owner}/{repo}/actions/permissions/access"
263+
},
264+
{
265+
"slug": "set-the-level-of-access-for-workflows-outside-of-the-repository",
266+
"verb": "put",
267+
"requestPath": "/repos/{owner}/{repo}/actions/permissions/access"
268+
},
259269
{
260270
"slug": "get-allowed-actions-for-a-repository",
261271
"verb": "get",

lib/rest/static/decorated/api.github.com.json

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,6 +1901,166 @@
19011901
}
19021902
]
19031903
},
1904+
{
1905+
"verb": "get",
1906+
"requestPath": "/repos/{owner}/{repo}/actions/permissions/access",
1907+
"parameters": [
1908+
{
1909+
"name": "owner",
1910+
"in": "path",
1911+
"required": true,
1912+
"schema": {
1913+
"type": "string"
1914+
},
1915+
"descriptionHTML": ""
1916+
},
1917+
{
1918+
"name": "repo",
1919+
"in": "path",
1920+
"required": true,
1921+
"schema": {
1922+
"type": "string"
1923+
},
1924+
"descriptionHTML": ""
1925+
}
1926+
],
1927+
"x-codeSamples": [
1928+
{
1929+
"lang": "Shell",
1930+
"sourceHTML": "<pre><code class=\"hljs language-shell\">curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/permissions/access</code></pre>"
1931+
},
1932+
{
1933+
"lang": "JavaScript",
1934+
"sourceHTML": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.<span class=\"hljs-title hljs-function\">request</span>(<span class=\"hljs-string\">'GET /repos/{owner}/{repo}/actions/permissions/access'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>\n})\n</code></pre>"
1935+
}
1936+
],
1937+
"summary": "Get the level of access for workflows outside of the repository",
1938+
"x-github": {
1939+
"enabledForGitHubApps": true,
1940+
"previews": [],
1941+
"category": "actions",
1942+
"subcategory": "permissions"
1943+
},
1944+
"slug": "get-the-level-of-access-for-workflows-outside-of-the-repository",
1945+
"category": "actions",
1946+
"subcategory": "permissions",
1947+
"notes": [],
1948+
"bodyParameters": [],
1949+
"descriptionHTML": "<p>Gets the level of access that workflows outside of the repository have to actions and workflows in the repository.\nThis endpoint only applies to internal repositories. For more information, see \"<a href=\"https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository\">Managing GitHub Actions settings for a repository</a>.\"</p>\n<p>You must authenticate using an access token with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the\nrepository <code>administration</code> permission to use this endpoint.</p>",
1950+
"responses": [
1951+
{
1952+
"httpStatusCode": "200",
1953+
"httpStatusMessage": "OK",
1954+
"description": "<p>Response</p>",
1955+
"payload": "<pre><code class=\"hljs language-json\"><span class=\"hljs-punctuation\">{</span>\n <span class=\"hljs-attr\">\"access_level\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"organization\"</span>\n<span class=\"hljs-punctuation\">}</span>\n</code></pre>"
1956+
}
1957+
]
1958+
},
1959+
{
1960+
"verb": "put",
1961+
"requestPath": "/repos/{owner}/{repo}/actions/permissions/access",
1962+
"parameters": [
1963+
{
1964+
"name": "owner",
1965+
"in": "path",
1966+
"required": true,
1967+
"schema": {
1968+
"type": "string"
1969+
},
1970+
"descriptionHTML": ""
1971+
},
1972+
{
1973+
"name": "repo",
1974+
"in": "path",
1975+
"required": true,
1976+
"schema": {
1977+
"type": "string"
1978+
},
1979+
"descriptionHTML": ""
1980+
}
1981+
],
1982+
"x-codeSamples": [
1983+
{
1984+
"lang": "Shell",
1985+
"sourceHTML": "<pre><code class=\"hljs language-shell\">curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/permissions/access \\\n -d '{\"access_level\":\"access_level\"}'</code></pre>"
1986+
},
1987+
{
1988+
"lang": "JavaScript",
1989+
"sourceHTML": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.<span class=\"hljs-title hljs-function\">request</span>(<span class=\"hljs-string\">'PUT /repos/{owner}/{repo}/actions/permissions/access'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">access_level</span>: <span class=\"hljs-string\">'access_level'</span>\n})\n</code></pre>"
1990+
}
1991+
],
1992+
"summary": "Set the level of access for workflows outside of the repository",
1993+
"requestBody": {
1994+
"required": true,
1995+
"content": {
1996+
"application/json": {
1997+
"schema": {
1998+
"type": "object",
1999+
"properties": {
2000+
"access_level": {
2001+
"type": "string",
2002+
"description": "<p><strong>Required</strong>. Defines the level of access that workflows outside of the repository have to actions and workflows within the\nrepository. <code>none</code> means access is only possible from workflows in this repository. Can be one of <code>none</code>, <code>organization</code>, <code>enterprise</code>.</p>",
2003+
"enum": [
2004+
"none",
2005+
"organization",
2006+
"enterprise"
2007+
],
2008+
"name": "access_level",
2009+
"in": "body",
2010+
"rawType": "string",
2011+
"rawDescription": "Defines the level of access that workflows outside of the repository have to actions and workflows within the\nrepository. `none` means access is only possible from workflows in this repository. Can be one of `none`, `organization`, `enterprise`.",
2012+
"childParamsGroups": []
2013+
}
2014+
},
2015+
"required": [
2016+
"access_level"
2017+
]
2018+
},
2019+
"examples": {
2020+
"default": {
2021+
"value": {
2022+
"access_level": "organization"
2023+
}
2024+
}
2025+
}
2026+
}
2027+
}
2028+
},
2029+
"x-github": {
2030+
"enabledForGitHubApps": true,
2031+
"previews": [],
2032+
"category": "actions",
2033+
"subcategory": "permissions"
2034+
},
2035+
"slug": "set-the-level-of-access-for-workflows-outside-of-the-repository",
2036+
"category": "actions",
2037+
"subcategory": "permissions",
2038+
"notes": [],
2039+
"descriptionHTML": "<p>Sets the level of access that workflows outside of the repository have to actions and workflows in the repository.\nThis endpoint only applies to internal repositories. For more information, see \"<a href=\"https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository\">Managing GitHub Actions settings for a repository</a>.\"</p>\n<p>You must authenticate using an access token with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the\nrepository <code>administration</code> permission to use this endpoint.</p>",
2040+
"responses": [
2041+
{
2042+
"httpStatusCode": "204",
2043+
"httpStatusMessage": "No Content",
2044+
"description": "<p>Response</p>"
2045+
}
2046+
],
2047+
"bodyParameters": [
2048+
{
2049+
"type": "string",
2050+
"description": "<p><strong>Required</strong>. Defines the level of access that workflows outside of the repository have to actions and workflows within the\nrepository. <code>none</code> means access is only possible from workflows in this repository. Can be one of <code>none</code>, <code>organization</code>, <code>enterprise</code>.</p>",
2051+
"enum": [
2052+
"none",
2053+
"organization",
2054+
"enterprise"
2055+
],
2056+
"name": "access_level",
2057+
"in": "body",
2058+
"rawType": "string",
2059+
"rawDescription": "Defines the level of access that workflows outside of the repository have to actions and workflows within the\nrepository. `none` means access is only possible from workflows in this repository. Can be one of `none`, `organization`, `enterprise`.",
2060+
"childParamsGroups": []
2061+
}
2062+
]
2063+
},
19042064
{
19052065
"verb": "get",
19062066
"requestPath": "/repos/{owner}/{repo}/actions/permissions/selected-actions",

lib/rest/static/dereferenced/api.github.com.deref.json

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135874,6 +135874,155 @@
135874135874
}
135875135875
}
135876135876
},
135877+
"/repos/{owner}/{repo}/actions/permissions/access": {
135878+
"get": {
135879+
"summary": "Get the level of access for workflows outside of the repository",
135880+
"description": "Gets the level of access that workflows outside of the repository have to actions and workflows in the repository.\nThis endpoint only applies to internal repositories. For more information, see \"[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the\nrepository `administration` permission to use this endpoint.",
135881+
"tags": [
135882+
"actions"
135883+
],
135884+
"operationId": "actions/get-workflow-access-to-repository",
135885+
"externalDocs": {
135886+
"description": "API method documentation",
135887+
"url": "https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository"
135888+
},
135889+
"parameters": [
135890+
{
135891+
"name": "owner",
135892+
"in": "path",
135893+
"required": true,
135894+
"schema": {
135895+
"type": "string"
135896+
}
135897+
},
135898+
{
135899+
"name": "repo",
135900+
"in": "path",
135901+
"required": true,
135902+
"schema": {
135903+
"type": "string"
135904+
}
135905+
}
135906+
],
135907+
"responses": {
135908+
"200": {
135909+
"description": "Response",
135910+
"content": {
135911+
"application/json": {
135912+
"schema": {
135913+
"type": "object",
135914+
"properties": {
135915+
"access_level": {
135916+
"type": "string",
135917+
"description": "Defines the level of access that workflows outside of the repository have to actions and workflows within the\nrepository. `none` means access is only possible from workflows in this repository. Can be one of `none`, `organization`, `enterprise`.",
135918+
"enum": [
135919+
"none",
135920+
"organization",
135921+
"enterprise"
135922+
]
135923+
}
135924+
},
135925+
"required": [
135926+
"access_level"
135927+
]
135928+
},
135929+
"examples": {
135930+
"default": {
135931+
"value": {
135932+
"access_level": "organization"
135933+
}
135934+
}
135935+
}
135936+
}
135937+
}
135938+
}
135939+
},
135940+
"x-github": {
135941+
"githubCloudOnly": false,
135942+
"enabledForGitHubApps": true,
135943+
"previews": [
135944+
135945+
],
135946+
"category": "actions",
135947+
"subcategory": "permissions"
135948+
}
135949+
},
135950+
"put": {
135951+
"summary": "Set the level of access for workflows outside of the repository",
135952+
"description": "Sets the level of access that workflows outside of the repository have to actions and workflows in the repository.\nThis endpoint only applies to internal repositories. For more information, see \"[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the\nrepository `administration` permission to use this endpoint.",
135953+
"tags": [
135954+
"actions"
135955+
],
135956+
"operationId": "actions/set-workflow-access-to-repository",
135957+
"externalDocs": {
135958+
"description": "API method documentation",
135959+
"url": "https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository"
135960+
},
135961+
"parameters": [
135962+
{
135963+
"name": "owner",
135964+
"in": "path",
135965+
"required": true,
135966+
"schema": {
135967+
"type": "string"
135968+
}
135969+
},
135970+
{
135971+
"name": "repo",
135972+
"in": "path",
135973+
"required": true,
135974+
"schema": {
135975+
"type": "string"
135976+
}
135977+
}
135978+
],
135979+
"requestBody": {
135980+
"required": true,
135981+
"content": {
135982+
"application/json": {
135983+
"schema": {
135984+
"type": "object",
135985+
"properties": {
135986+
"access_level": {
135987+
"type": "string",
135988+
"description": "Defines the level of access that workflows outside of the repository have to actions and workflows within the\nrepository. `none` means access is only possible from workflows in this repository. Can be one of `none`, `organization`, `enterprise`.",
135989+
"enum": [
135990+
"none",
135991+
"organization",
135992+
"enterprise"
135993+
]
135994+
}
135995+
},
135996+
"required": [
135997+
"access_level"
135998+
]
135999+
},
136000+
"examples": {
136001+
"default": {
136002+
"value": {
136003+
"access_level": "organization"
136004+
}
136005+
}
136006+
}
136007+
}
136008+
}
136009+
},
136010+
"responses": {
136011+
"204": {
136012+
"description": "Response"
136013+
}
136014+
},
136015+
"x-github": {
136016+
"githubCloudOnly": false,
136017+
"enabledForGitHubApps": true,
136018+
"previews": [
136019+
136020+
],
136021+
"category": "actions",
136022+
"subcategory": "permissions"
136023+
}
136024+
}
136025+
},
135877136026
"/repos/{owner}/{repo}/actions/permissions/selected-actions": {
135878136027
"get": {
135879136028
"summary": "Get allowed actions for a repository",

0 commit comments

Comments
 (0)