Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update OpenAPI Descriptions (#25706)
* Update OpenAPI  Descriptions

* Add decorated OpenAPI schema files

Co-authored-by: github-openapi-bot <[email protected]>
Co-authored-by: Ethan P <[email protected]>
  • Loading branch information
3 people authored Mar 1, 2022
commit 271e7c301ace3e4a69ed65edc63a4ed477a19c93
10 changes: 10 additions & 0 deletions lib/rest/static/apps/enabled-for-apps.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,16 @@
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/actions/permissions"
},
{
"slug": "get-the-level-of-access-for-workflows-outside-of-the-repository",
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/permissions/access"
},
{
"slug": "set-the-level-of-access-for-workflows-outside-of-the-repository",
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/actions/permissions/access"
},
{
"slug": "get-allowed-actions-for-a-repository",
"verb": "get",
Expand Down
160 changes: 160 additions & 0 deletions lib/rest/static/decorated/api.github.amrom.workers.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -1901,6 +1901,166 @@
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/permissions/access",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"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>"
},
{
"lang": "JavaScript",
"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>"
}
],
"summary": "Get the level of access for workflows outside of the repository",
"x-github": {
"enabledForGitHubApps": true,
"previews": [],
"category": "actions",
"subcategory": "permissions"
},
"slug": "get-the-level-of-access-for-workflows-outside-of-the-repository",
"category": "actions",
"subcategory": "permissions",
"notes": [],
"bodyParameters": [],
"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>",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "<p>Response</p>",
"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>"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/actions/permissions/access",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"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>"
},
{
"lang": "JavaScript",
"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>"
}
],
"summary": "Set the level of access for workflows outside of the repository",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_level": {
"type": "string",
"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>",
"enum": [
"none",
"organization",
"enterprise"
],
"name": "access_level",
"in": "body",
"rawType": "string",
"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`.",
"childParamsGroups": []
}
},
"required": [
"access_level"
]
},
"examples": {
"default": {
"value": {
"access_level": "organization"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"previews": [],
"category": "actions",
"subcategory": "permissions"
},
"slug": "set-the-level-of-access-for-workflows-outside-of-the-repository",
"category": "actions",
"subcategory": "permissions",
"notes": [],
"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>",
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "<p>Response</p>"
}
],
"bodyParameters": [
{
"type": "string",
"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>",
"enum": [
"none",
"organization",
"enterprise"
],
"name": "access_level",
"in": "body",
"rawType": "string",
"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`.",
"childParamsGroups": []
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/permissions/selected-actions",
Expand Down
149 changes: 149 additions & 0 deletions lib/rest/static/dereferenced/api.github.amrom.workers.dev.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -135874,6 +135874,155 @@
}
}
},
"/repos/{owner}/{repo}/actions/permissions/access": {
"get": {
"summary": "Get the level of access for workflows outside of the repository",
"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.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-access-to-repository",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository"
},
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_level": {
"type": "string",
"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`.",
"enum": [
"none",
"organization",
"enterprise"
]
}
},
"required": [
"access_level"
]
},
"examples": {
"default": {
"value": {
"access_level": "organization"
}
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [

],
"category": "actions",
"subcategory": "permissions"
}
},
"put": {
"summary": "Set the level of access for workflows outside of the repository",
"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.",
"tags": [
"actions"
],
"operationId": "actions/set-workflow-access-to-repository",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository"
},
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_level": {
"type": "string",
"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`.",
"enum": [
"none",
"organization",
"enterprise"
]
}
},
"required": [
"access_level"
]
},
"examples": {
"default": {
"value": {
"access_level": "organization"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [

],
"category": "actions",
"subcategory": "permissions"
}
}
},
"/repos/{owner}/{repo}/actions/permissions/selected-actions": {
"get": {
"summary": "Get allowed actions for a repository",
Expand Down