关于 GitHub App 权限
GitHub Apps 是用一组权限创建的。 权限定义了 GitHub App 可以通过 API 访问哪些资源。 有关详细信息,请参阅“为 GitHub Apps 选择权限”。
为帮助正确选择权限,在 REST API 响应中将会收到 X-Accepted-GitHub-Permissions
标头。 标头将会提示访问端点所需的权限。 有关详细信息,请参阅“REST API 故障排除”。
需要拥有这些权限才能访问专用资源。 某些端点也可以用来访问不具有这些权限的公共资源。 若要查看端点是否可以在没有权限的情况下访问公共资源,请参阅该端点的文档。
某些端点需要多个权限。 其他端点使用一组权限中的任何一个权限。 在这些情况下,“其他权限”列将包含复选标记。 有关使用端点所需的权限的完整详细信息,请参阅该端点的文档。
Business permissions for "Enterprise administration"
Organization permissions for "Administration"
Organization permissions for "Blocking users"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
PUT /orgs/{org}/blocks/{username} | write | UAT IAT | |
DELETE /orgs/{org}/blocks/{username} | write | UAT IAT | |
GET /orgs/{org}/blocks | read | UAT IAT | |
GET /orgs/{org}/blocks/{username} | read | UAT IAT |
Organization permissions for "Custom organization roles"
Organization permissions for "Custom properties"
Organization permissions for "Custom repository roles"
Organization permissions for "Events"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
GET /users/{username}/events/orgs/{org} | read | UAT |
Organization permissions for "GitHub Copilot Business"
Organization permissions for "Members"
Organization permissions for "Organization announcement banners"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
PATCH /orgs/{org}/announcement | write | UAT IAT | |
DELETE /orgs/{org}/announcement | write | UAT IAT | |
GET /orgs/{org}/announcement | read | UAT IAT |
Organization permissions for "Organization codespaces secrets"
Organization permissions for "Organization codespaces settings"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
PUT /orgs/{org}/codespaces/access | write | UAT IAT | |
POST /orgs/{org}/codespaces/access/selected_users | write | UAT IAT | |
DELETE /orgs/{org}/codespaces/access/selected_users | write | UAT IAT |
Organization permissions for "Organization codespaces"
Organization permissions for "Organization dependabot secrets"
Organization permissions for "Personal access token requests"
Organization permissions for "Personal access tokens"
Organization permissions for "Projects"
Organization permissions for "Secrets"
Organization permissions for "Self-hosted runners"
Organization permissions for "Team discussions"
Organization permissions for "Variables"
Organization permissions for "Webhooks"
Repository permissions for "Actions"
Repository permissions for "Administration"
Repository permissions for "Attestations"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
POST /repos/{owner}/{repo}/attestations | write | UAT IAT | |
GET /repos/{owner}/{repo}/attestations/{subject_digest} | read | UAT IAT |
Repository permissions for "Checks"
Repository permissions for "Code scanning alerts"
Repository permissions for "Codespaces lifecycle admin"
Repository permissions for "Codespaces metadata"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
GET /repos/{owner}/{repo}/codespaces/devcontainers | read | UAT IAT | |
GET /repos/{owner}/{repo}/codespaces/machines | read | UAT IAT | |
GET /user/codespaces/{codespace_name}/machines | read | UAT |
Repository permissions for "Codespaces secrets"
Repository permissions for "Codespaces"
Repository permissions for "Commit statuses"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
POST /repos/{owner}/{repo}/statuses/{sha} | write | UAT IAT | |
GET /repos/{owner}/{repo}/commits/{ref}/status | read | UAT IAT | |
GET /repos/{owner}/{repo}/commits/{ref}/statuses | read | UAT IAT |
Repository permissions for "Contents"
Repository permissions for "Custom properties"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
PATCH /repos/{owner}/{repo}/properties/values | write | UAT IAT |
Repository permissions for "Dependabot alerts"
Repository permissions for "Dependabot secrets"
Repository permissions for "Deployments"
Repository permissions for "Environments"
Repository permissions for "Issues"
Repository permissions for "Metadata"
Repository permissions for "Pages"
Repository permissions for "Projects"
Repository permissions for "Pull requests"
Repository permissions for "Repository security advisories"
Repository permissions for "Secret scanning alerts"
Repository permissions for "Secrets"
Repository permissions for "Variables"
Repository permissions for "Webhooks"
Repository permissions for "Workflows"
User permissions for "Block another user"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
PUT /user/blocks/{username} | write | UAT | |
DELETE /user/blocks/{username} | write | UAT | |
GET /user/blocks | read | UAT | |
GET /user/blocks/{username} | read | UAT |
User permissions for "Codespaces user secrets"
User permissions for "Email addresses"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
PATCH /user/email/visibility | write | UAT | |
POST /user/emails | write | UAT | |
DELETE /user/emails | write | UAT | |
GET /user/emails | read | UAT | |
GET /user/public_emails | read | UAT |
User permissions for "Followers"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
PUT /user/following/{username} | write | UAT | |
DELETE /user/following/{username} | write | UAT | |
GET /user/followers | read | UAT | |
GET /user/following | read | UAT | |
GET /user/following/{username} | read | UAT |
User permissions for "GPG keys"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
POST /user/gpg_keys | write | UAT | |
DELETE /user/gpg_keys/{gpg_key_id} | write | UAT | |
GET /user/gpg_keys | read | UAT | |
GET /user/gpg_keys/{gpg_key_id} | read | UAT |
User permissions for "Gists"
User permissions for "Git SSH keys"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
POST /user/keys | write | UAT | |
DELETE /user/keys/{key_id} | write | UAT | |
GET /user/keys | read | UAT | |
GET /user/keys/{key_id} | read | UAT | |
GET /users/{username}/keys | read | UAT IAT |
User permissions for "Interaction limits"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
PUT /user/interaction-limits | write | UAT | |
DELETE /user/interaction-limits | write | UAT | |
GET /user/interaction-limits | read | UAT |
User permissions for "Notifications"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
GET /notifications | read | UAT | 需要多个权限,或者可以使用不同的权限。 有关权限的更多信息,请参阅此终结点的文档。 |
User permissions for "Plan"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
GET /users/{username}/settings/billing/actions | read | UAT | |
GET /users/{username}/settings/billing/packages | read | UAT | |
GET /users/{username}/settings/billing/shared-storage | read | UAT |
User permissions for "Profile"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
PATCH /user | write | UAT | |
POST /user/social_accounts | write | UAT | |
DELETE /user/social_accounts | write | UAT |
User permissions for "SSH signing keys"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
POST /user/ssh_signing_keys | write | UAT | |
DELETE /user/ssh_signing_keys/{ssh_signing_key_id} | write | UAT | |
GET /user/ssh_signing_keys | read | UAT | |
GET /user/ssh_signing_keys/{ssh_signing_key_id} | read | UAT |
User permissions for "Starring"
User permissions for "Watching"
终结点 | Access | 令牌类型 | 其他权限 |
---|---|---|---|
GET /user/subscriptions | read | UAT | |
GET /users/{username}/subscriptions | read | UAT IAT |