Skip to content

Commit 769711c

Browse files
docs-bothubwriter
andauthored
Update OpenAPI Description (#55556)
Co-authored-by: hubwriter <hubwriter@github.com>
1 parent db5d011 commit 769711c

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

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": "924dff466f65278c173f50a71fb6cd4283c68caf"
63+
"sha": "09072d8aecf89642ff0e83cf1189d006e64f9714"
6464
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219952,7 +219952,7 @@
219952219952
}
219953219953
],
219954219954
"previews": [],
219955-
"descriptionHTML": "<p>For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.\nOrganization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint.</p>\n<p>Team members will include the members of child teams.</p>\n<p>The authenticated user must have push access to the repository to use this endpoint.</p>\n<p>OAuth app tokens and personal access tokens (classic) need the <code>read:org</code> and <code>repo</code> scopes to use this endpoint.</p>",
219955+
"descriptionHTML": "<p>For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.\nThe <code>permissions</code> hash returned in the response contains the base role permissions of the collaborator. The <code>role_name</code> is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise.\nThere is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response.</p>\n<p>Team members will include the members of child teams.</p>\n<p>The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization.\nOAuth app tokens and personal access tokens (classic) need the <code>read:org</code> and <code>repo</code> scopes to use this endpoint.</p>",
219956219956
"statusCodes": [
219957219957
{
219958219958
"httpStatusCode": "200",
@@ -221503,7 +221503,7 @@
221503221503
}
221504221504
],
221505221505
"previews": [],
221506-
"descriptionHTML": "<p>This endpoint triggers <a href=\"https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications\">notifications</a>. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"<a href=\"https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits\">Rate limits for the API</a>\" and \"<a href=\"https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api\">Best practices for using the REST API</a>.\"</p>\n<p>Adding an outside collaborator may be restricted by enterprise administrators. For more information, see \"<a href=\"https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories\">Enforcing repository management policies in your enterprise</a>.\"</p>\n<p>For more information on permission levels, see \"<a href=\"https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization\">Repository permission levels for an organization</a>\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:</p>\n<pre><code>Cannot assign {member} permission of {role name}\n</code></pre>\n<p>Note that, if you choose not to pass any parameters, you'll need to set <code>Content-Length</code> to zero when calling out to this endpoint. For more information, see \"<a href=\"https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method\">HTTP method</a>.\"</p>\n<p>The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the <a href=\"https://docs.github.com/rest/collaborators/invitations\">API</a>.</p>\n<p><strong>Updating an existing collaborator's permission level</strong></p>\n<p>The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different <code>permission</code> parameter. The response will be a <code>204</code>, with no other indication that the permission level changed.</p>\n<p><strong>Rate limits</strong></p>\n<p>You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.</p>",
221506+
"descriptionHTML": "<p>Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an \"outside collaborator\" (if they are not an Enterprise Managed User) or a \"repository collaborator\" if they are an Enterprise Managed User. These users are exempt from some organization policies - see \"<a href=\"https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization\">Adding outside collaborators to repositories</a>\" to learn more about these collaborator types.</p>\n<p>This endpoint triggers <a href=\"https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications\">notifications</a>.</p>\n<p>Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see \"<a href=\"https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories\">Enforcing repository management policies in your enterprise</a>\" and \"<a href=\"https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators\">Setting permissions for adding outside collaborators</a>\" for organization settings.</p>\n<p>For more information on permission levels, see \"<a href=\"https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization\">Repository permission levels for an organization</a>\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:</p>\n<pre><code>Cannot assign {member} permission of {role name}\n</code></pre>\n<p>Note that, if you choose not to pass any parameters, you'll need to set <code>Content-Length</code> to zero when calling out to this endpoint. For more information, see \"<a href=\"https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method\">HTTP method</a>.\"</p>\n<p>The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the <a href=\"https://docs.github.com/rest/collaborators/invitations\">API</a>.</p>\n<p>For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise.</p>\n<p><strong>Updating an existing collaborator's permission level</strong></p>\n<p>The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different <code>permission</code> parameter. The response will be a <code>204</code>, with no other indication that the permission level changed.</p>\n<p><strong>Rate limits</strong></p>\n<p>You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.</p>",
221507221507
"statusCodes": [
221508221508
{
221509221509
"httpStatusCode": "201",
@@ -221519,7 +221519,7 @@
221519221519
},
221520221520
{
221521221521
"httpStatusCode": "422",
221522-
"description": "<p>Validation failed, or the endpoint has been spammed.</p>"
221522+
"description": "<p>Response when:</p>\n<ul>\n<li>validation failed, or the endpoint has been spammed</li>\n<li>an Enterprise Managed User (EMU) account was invited to a repository in an enterprise with personal user accounts</li>\n</ul>"
221523221523
}
221524221524
]
221525221525
},
@@ -221918,7 +221918,7 @@
221918221918
}
221919221919
],
221920221920
"previews": [],
221921-
"descriptionHTML": "<p>Checks the repository permission of a collaborator. The possible repository\npermissions are <code>admin</code>, <code>write</code>, <code>read</code>, and <code>none</code>.</p>\n<p><em>Note</em>: The <code>permission</code> attribute provides the legacy base roles of <code>admin</code>, <code>write</code>, <code>read</code>, and <code>none</code>, where the\n<code>maintain</code> role is mapped to <code>write</code> and the <code>triage</code> role is mapped to <code>read</code>. To determine the role assigned to the\ncollaborator, see the <code>role_name</code> attribute, which will provide the full role name, including custom roles. The\n<code>permissions</code> hash can also be used to determine which base level of access the collaborator has to the repository.</p>",
221921+
"descriptionHTML": "<p>Checks the repository permission and role of a collaborator.</p>\n<p>The <code>permission</code> attribute provides the legacy base roles of <code>admin</code>, <code>write</code>, <code>read</code>, and <code>none</code>, where the\n<code>maintain</code> role is mapped to <code>write</code> and the <code>triage</code> role is mapped to <code>read</code>.\nThe <code>role_name</code> attribute provides the name of the assigned role, including custom roles. The\n<code>permission</code> can also be used to determine which base level of access the collaborator has to the repository.</p>\n<p>The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise.\nThere is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response.</p>",
221922221922
"statusCodes": [
221923221923
{
221924221924
"httpStatusCode": "200",

0 commit comments

Comments
 (0)