repo_permissions
Overview
Name | repo_permissions |
Type | Resource |
Id | github.teams.repo_permissions |
Fields
Name | Datatype | Description |
---|---|---|
id | integer | Unique identifier of the repository |
name | string | The name of the repository. |
description | string | |
allow_auto_merge | boolean | Whether to allow Auto-merge to be used on pull requests. |
allow_forking | boolean | Whether to allow forking this repo |
allow_merge_commit | boolean | Whether to allow merge commits for pull requests. |
allow_rebase_merge | boolean | Whether to allow rebase merges for pull requests. |
allow_squash_merge | boolean | Whether to allow squash merges for pull requests. |
archive_url | string | |
archived | boolean | Whether the repository is archived. |
assignees_url | string | |
blobs_url | string | |
branches_url | string | |
clone_url | string | |
collaborators_url | string | |
comments_url | string | |
commits_url | string | |
compare_url | string | |
contents_url | string | |
contributors_url | string | |
created_at | string | |
default_branch | string | The default branch of the repository. |
delete_branch_on_merge | boolean | Whether to delete head branches when pull requests are merged |
deployments_url | string | |
disabled | boolean | Returns whether or not this repository disabled. |
downloads_url | string | |
events_url | string | |
fork | boolean | |
forks | integer | |
forks_count | integer | |
forks_url | string | |
full_name | string | |
git_commits_url | string | |
git_refs_url | string | |
git_tags_url | string | |
git_url | string | |
has_downloads | boolean | Whether downloads are enabled. |
has_issues | boolean | Whether issues are enabled. |
has_pages | boolean | |
has_projects | boolean | Whether projects are enabled. |
has_wiki | boolean | Whether the wiki is enabled. |
homepage | string | |
hooks_url | string | |
html_url | string | |
is_template | boolean | Whether this repository acts as a template that can be used to generate new repositories. |
issue_comment_url | string | |
issue_events_url | string | |
issues_url | string | |
keys_url | string | |
labels_url | string | |
language | string | |
languages_url | string | |
license | object | License Simple |
master_branch | string | |
merges_url | string | |
milestones_url | string | |
mirror_url | string | |
network_count | integer | |
node_id | string | |
notifications_url | string | |
open_issues | integer | |
open_issues_count | integer | |
owner | object | A GitHub user. |
permissions | object | |
private | boolean | Whether the repository is private or public. |
pulls_url | string | |
pushed_at | string | |
releases_url | string | |
role_name | string | |
size | integer | |
ssh_url | string | |
stargazers_count | integer | |
stargazers_url | string | |
statuses_url | string | |
subscribers_count | integer | |
subscribers_url | string | |
subscription_url | string | |
svn_url | string | |
tags_url | string | |
teams_url | string | |
temp_clone_token | string | |
template_repository | object | A repository on GitHub. |
topics | array | |
trees_url | string | |
updated_at | string | |
url | string | |
visibility | string | The repository visibility: public, private, or internal. |
watchers | integer | |
watchers_count | integer | |
web_commit_signoff_required | boolean | Whether to require contributors to sign off on web-based commits |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
check_permissions_for_repo_in_org | SELECT | org, owner, repo, team_slug | Checks whether a team has admin , push , maintain , triage , or pull permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom media type via the application/vnd.github.v3.repository+json accept header.If a team doesn't have permission for the repository, you will receive a 404 Not Found response status.Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo} . |
check_permissions_for_repo_legacy | SELECT | owner, repo, team_id | Note: Repositories inherited through a parent team will also be checked. Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Check team permissions for a repository endpoint. You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom media type via the Accept header: |
add_or_update_repo_permissions_in_org | EXEC | org, owner, repo, team_slug | To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs."Note: You can also specify a team by org_id and team_id using the route PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo} .For more information about the permission levels, see "Repository permission levels for an organization". |
add_or_update_repo_permissions_legacy | EXEC | owner, repo, team_id | Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "Add or update team repository permissions" endpoint. To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity status if you attempt to add a repository to a team that is not owned by the organization.Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs." |