From d48df937ad3739a5773e77a5d3b2b4cd7e9507b6 Mon Sep 17 00:00:00 2001 From: Lucas Costi Date: Sat, 10 Oct 2020 05:21:35 +1000 Subject: [PATCH 1/2] Add Actions permissions API operations (#15805) * Add new section for Actions permissions API * Add description for new 'Permissions' section * Apply suggestions from code review * add latest rest-api-operations module Co-authored-by: Leona B. Campbell <3880403+runleonarun@users.noreply.github.com> Co-authored-by: Rachael Sewell --- content/rest/reference/actions.md | 14 ++++++++++++-- package-lock.json | 10 +++++----- package.json | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/content/rest/reference/actions.md b/content/rest/reference/actions.md index 2671aaa7af4d..a162cda6f3ad 100644 --- a/content/rest/reference/actions.md +++ b/content/rest/reference/actions.md @@ -24,6 +24,16 @@ The Artifacts API allows you to download, delete, and retrieve information about {% if operation.subcategory == 'artifacts' %}{% include rest_operation %}{% endif %} {% endfor %} +## Permissions + +The Permissions API allows you to set permissions for what organizations and repositories are allowed to run {% data variables.product.prodname_actions %}, and what actions are allowed to run. For more information, see "[Usage limits, billing, and administration](/actions/reference/usage-limits-billing-and-administration#disabling-or-limiting-github-actions-for-your-repository-or-organization)." + +You can also set permissions for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin#github-actions)" REST API. + +{% for operation in currentRestOperations %} + {% if operation.subcategory == 'permissions' %}{% include rest_operation %}{% endif %} +{% endfor %} + ## Secrets The Secrets API lets you create, update, delete, and retrieve information about encrypted secrets. {% data reusables.actions.about-secrets %} For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)." @@ -40,7 +50,7 @@ The Self-hosted Runners API allows you to register, view, and delete self-hosted {% data reusables.actions.actions-authentication %} {% data variables.product.prodname_github_app %}s must have the `administration` permission for repositories or the `organization_self_hosted_runners` permission for organizations. Authenticated users must have admin access to the repository or organization to use this API. -You can manage self-hosted runners for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin#actions)" REST API. +You can manage self-hosted runners for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin#github-actions)" REST API. {% for operation in currentRestOperations %} {% if operation.subcategory == 'self-hosted-runners' %}{% include rest_operation %}{% endif %} @@ -52,7 +62,7 @@ The Self-hosted Runners Groups API allows you manage groups of self-hosted runne {% data reusables.actions.actions-authentication %} {% data variables.product.prodname_github_app %}s must have the `administration` permission for repositories or the `organization_self_hosted_runners` permission for organizations. Authenticated users must have admin access to the repository or organization to use this API. -You can manage self-hosted runner groups for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin#actions)" REST API. +You can manage self-hosted runner groups for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin##github-actions)" REST API. {% for operation in currentRestOperations %} {% if operation.subcategory == 'self-hosted-runner-groups' %}{% include rest_operation %}{% endif %} diff --git a/package-lock.json b/package-lock.json index 402075a1ce1b..f3ecdd2c5222 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1144,9 +1144,9 @@ } }, "@github/rest-api-operations": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@github/rest-api-operations/-/rest-api-operations-2.1.0.tgz", - "integrity": "sha512-F9E4WIpe8LtDBI9vD8ZuAiaL6DaKv8wZQ2Qkay3hkbJZB4ehxCcgoDmGQODNQEb1u624gbnAOzTG2hrVSuZNUA==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@github/rest-api-operations/-/rest-api-operations-3.1.0.tgz", + "integrity": "sha512-RszMVxIbGvey7pS1wUZ7yULUGH2SFQFYodsAv5X0oubWoJQSlmw1RGoyc8b2YeD/VD4Ljjrq73y3bhu+6eVOlg==" }, "@hapi/address": { "version": "2.1.4", @@ -7289,7 +7289,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -9907,7 +9907,7 @@ "dependencies": { "mkdirp": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=" }, "nopt": { diff --git a/package.json b/package.json index d999e4046531..afd316ffc3fb 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@github-docs/data-directory": "^1.2.0", "@github-docs/frontmatter": "^1.3.1", "@github-docs/render-content": "^5.0.0", - "@github/rest-api-operations": "^2.1.0", + "@github/rest-api-operations": "^3.1.0", "@octokit/rest": "^16.38.1", "@primer/css": "^15.1.0", "@primer/octicons": "^11.0.0", From a7dcf10e0088f2aaaa51894b6fda0c17a24bd275 Mon Sep 17 00:00:00 2001 From: Gregor Martynus Date: Fri, 9 Oct 2020 13:07:33 -0700 Subject: [PATCH 2/2] notify @github/octokit-maintainers about changes in REST APIs (#15960) We had the same thing to the last docs repository (https://github.com/github/internal-developer.github.com/pull/4800), it was very helpful. Would that be possible? I think the overhead to this solution is to add members from @docs-engineering to @octokit-maintainers, so that no review is required from me or other future Octokit maintainers Co-authored-by: Zeke Sikelianos --- .github/CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bebc3f7218c9..eb71a6edef7a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -14,3 +14,7 @@ package-lock.json @github/docs-engineering package.json @github/docs-engineering /content/github/site-policy/ @github/site-policy-admins + +# Make sure that Octokit maintainers get notified about changes +# relevant to the Octokit libraries (https://github.com/octokit) +/content/rest/reference @github/octokit-maintainers