@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api GitHub v3 REST API
@base {protocol}://{hostname}/api/v3
@version 1.1.4
@auth ApiKey access_token in path
@endpoints 558
@hint download_for_search
@toc root(1), admin(33), app(5), app-manifests(1), applications(11), apps(1), authorizations(7), codes_of_conduct(2), emojis(1), enterprise(12), events(1), feeds(1), gists(19), gitignore(2), installation(2), issues(1), licenses(2), markdown(2), meta(1), networks(1), notifications(7), octocat(1), organizations(1), orgs(67), projects(19), rate_limit(1), reactions(1), repos(238), repositories(1), search(7), setup(11), teams(33), user(40), users(24), zen(1)

@group root
@endpoint GET /
@desc GitHub API Root
@returns(200) {current_user_url: str(uri-template), current_user_authorizations_html_url: str(uri-template), authorizations_url: str(uri-template), code_search_url: str(uri-template), commit_search_url: str(uri-template), emails_url: str(uri-template), emojis_url: str(uri-template), events_url: str(uri-template), feeds_url: str(uri-template), followers_url: str(uri-template), following_url: str(uri-template), gists_url: str(uri-template), hub_url: str(uri-template), issue_search_url: str(uri-template), issues_url: str(uri-template), keys_url: str(uri-template), label_search_url: str(uri-template), notifications_url: str(uri-template), organization_url: str(uri-template), organization_repositories_url: str(uri-template), organization_teams_url: str(uri-template), public_gists_url: str(uri-template), rate_limit_url: str(uri-template), repository_url: str(uri-template), repository_search_url: str(uri-template), current_user_repositories_url: str(uri-template), starred_url: str(uri-template), starred_gists_url: str(uri-template), topic_search_url: str(uri-template), user_url: str(uri-template), user_organizations_url: str(uri-template), user_repositories_url: str(uri-template), user_search_url: str(uri-template)} # Response

@endgroup

@group admin
@endpoint GET /admin/hooks
@desc List global webhooks
@required {accept: str=application/vnd.github.superpro-preview+json # This API is under preview and subject to change.}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /admin/hooks
@desc Create a global webhook
@required {accept: str=application/vnd.github.superpro-preview+json # This API is under preview and subject to change., name: str # Must be passed as "web"., config: map{url!: str, content_type: str, secret: str, insecure_ssl: str} # Key/value pairs to provide settings for this webhook.}
@optional {events: [str] # The [events](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`., active: bool=true # Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.}
@returns(201) {type: str, id: int, name: str, active: bool, events: [str], config: map{url: str, content_type: str, insecure_ssl: str, secret: str}, updated_at: str, created_at: str, url: str, ping_url: str} # Response
@example_request {"name":"web","events":["organization","user"],"config":{"url":"https://example.com/webhook","content_type":"json","secret":"secret"}}

@endpoint GET /admin/hooks/{hook_id}
@desc Get a global webhook
@required {accept: str=application/vnd.github.superpro-preview+json # This API is under preview and subject to change., hook_id: int}
@returns(200) {type: str, id: int, name: str, active: bool, events: [str], config: map{url: str, content_type: str, insecure_ssl: str, secret: str}, updated_at: str, created_at: str, url: str, ping_url: str} # Response

@endpoint PATCH /admin/hooks/{hook_id}
@desc Update a global webhook
@required {accept: str=application/vnd.github.superpro-preview+json # This API is under preview and subject to change., hook_id: int}
@optional {config: map{url!: str, content_type: str, secret: str, insecure_ssl: str} # Key/value pairs to provide settings for this webhook., events: [str] # The [events](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`., active: bool=true # Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.}
@returns(200) {type: str, id: int, name: str, active: bool, events: [str], config: map{url: str, content_type: str, insecure_ssl: str}, updated_at: str, created_at: str, url: str, ping_url: str} # Response
@example_request {"events":["organization"],"config":{"url":"https://example.com/webhook"}}

@endpoint DELETE /admin/hooks/{hook_id}
@desc Delete a global webhook
@required {accept: str=application/vnd.github.superpro-preview+json # This API is under preview and subject to change., hook_id: int}
@returns(204) Response

@endpoint POST /admin/hooks/{hook_id}/pings
@desc Ping a global webhook
@required {accept: str=application/vnd.github.superpro-preview+json # This API is under preview and subject to change., hook_id: int}
@returns(204) Response

@endpoint GET /admin/keys
@desc List public keys
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., sort: str(created/updated/accessed)=created, since: str # Only show public keys accessed after the given time.}
@returns(200) Response

@endpoint DELETE /admin/keys/{key_ids}
@desc Delete a public key
@required {key_ids: str}
@returns(204) Response

@endpoint PATCH /admin/ldap/teams/{team_id}/mapping
@desc Update LDAP mapping for a team
@required {team_id: int}
@optional {ldap_dn: str # The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.}
@returns(200) {ldap_dn: str, id: int, node_id: str, url: str, html_url: str, name: str, slug: str, description: str?, privacy: str, permission: str, members_url: str, repositories_url: str, parent: any?} # Response
@example_request {"ldap_dn":"cn=Enterprise Ops,ou=teams,dc=github,dc=com"}

@endpoint POST /admin/ldap/teams/{team_id}/sync
@desc Sync LDAP mapping for a team
@required {team_id: int}
@returns(201) {status: str} # Response

@endpoint PATCH /admin/ldap/users/{username}/mapping
@desc Update LDAP mapping for a user
@required {username: str}
@optional {ldap_dn: str # The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.}
@returns(200) {ldap_dn: str, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, name: str?, company: str?, blog: str?, location: str?, email: str(email)?, hireable: bool?, bio: str?, twitter_username: str?, public_repos: int, public_gists: int, followers: int, following: int, created_at: str(date-time), updated_at: str(date-time), private_gists: int, total_private_repos: int, owned_private_repos: int, disk_usage: int, collaborators: int, two_factor_authentication: bool, plan: map{collaborators: int, name: str, space: int, private_repos: int}, suspended_at: str(date-time)?, business_plus: bool} # Response
@example_request {"ldap_dn":"uid=asdf,ou=users,dc=github,dc=com"}

@endpoint POST /admin/ldap/users/{username}/sync
@desc Sync LDAP mapping for a user
@required {username: str}
@returns(201) {status: str} # Response

@endpoint POST /admin/organizations
@desc Create an organization
@required {login: str # The organization's username., admin: str # The login of the user who will manage this organization.}
@optional {profile_name: str # The organization's display name.}
@returns(201) {login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?} # Response
@example_request {"login":"github","profile_name":"GitHub, Inc.","admin":"monalisaoctocat"}

@endpoint PATCH /admin/organizations/{org}
@desc Update an organization name
@required {org: str, login: str # The organization's new name.}
@returns(202) {message: str, url: str} # Response
@example_request {"login":"the-new-octocats"}

@endpoint GET /admin/pre-receive-environments
@desc List pre-receive environments
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., sort: str(created/updated/name)=created}
@returns(200) Response

@endpoint POST /admin/pre-receive-environments
@desc Create a pre-receive environment
@required {name: str # The new pre-receive environment's name., image_url: str # URL from which to download a tarball of this environment.}
@returns(201) {id: int, name: str, image_url: str, url: str, html_url: str, default_environment: bool, created_at: str, hooks_count: int, download: map{url: str, state: str, downloaded_at: str?, message: str?}} # Response
@example_request {"name":"DevTools Hook Env","image_url":"https://my_file_server/path/to/devtools_env.tar.gz"}

@endpoint GET /admin/pre-receive-environments/{pre_receive_environment_id}
@desc Get a pre-receive environment
@required {pre_receive_environment_id: int}
@returns(200) {id: int, name: str, image_url: str, url: str, html_url: str, default_environment: bool, created_at: str, hooks_count: int, download: map{url: str, state: str, downloaded_at: str?, message: str?}} # Response

@endpoint PATCH /admin/pre-receive-environments/{pre_receive_environment_id}
@desc Update a pre-receive environment
@required {pre_receive_environment_id: int}
@optional {name: str # This pre-receive environment's new name., image_url: str # URL from which to download a tarball of this environment.}
@returns(200) {id: int, name: str, image_url: str, url: str, html_url: str, default_environment: bool, created_at: str, hooks_count: int, download: map{url: str, state: str, downloaded_at: str?, message: str?}} # Response
@errors {422: Client Errors}

@endpoint DELETE /admin/pre-receive-environments/{pre_receive_environment_id}
@desc Delete a pre-receive environment
@required {pre_receive_environment_id: int}
@returns(204) Response
@errors {422: Client Errors}

@endpoint POST /admin/pre-receive-environments/{pre_receive_environment_id}/downloads
@desc Start a pre-receive environment download
@required {pre_receive_environment_id: int}
@returns(202) {url: str, state: str, downloaded_at: str?, message: str?} # Response
@errors {422: Client Errors}

@endpoint GET /admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest
@desc Get the download status for a pre-receive environment
@required {pre_receive_environment_id: int}
@returns(200) {url: str, state: str, downloaded_at: str?, message: str?} # Response

@endpoint GET /admin/pre-receive-hooks
@desc List pre-receive hooks
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., sort: str(created/updated/name)=created # One of `created` (when the repository was starred) or `updated` (when it was last pushed to) or `name`.}
@returns(200) Response

@endpoint POST /admin/pre-receive-hooks
@desc Create a pre-receive hook
@required {name: str # The name of the hook., script: str # The script that the hook runs., script_repository: map{} # The GitHub repository where the script is kept., environment: map{} # The pre-receive environment where the script is executed.}
@optional {enforcement: str # The state of enforcement for this hook. default: `disabled`, allow_downstream_configuration: bool # Whether enforcement can be overridden at the org or repo level. default: `false`}
@returns(201) {id: int, name: str, enforcement: str, script: str, script_repository: map{id: int, full_name: str, url: str, html_url: str}, environment: map{id: int, name: str, image_url: str, url: str, html_url: str, default_environment: bool, created_at: str, hooks_count: int, download: map{url: str, state: str, downloaded_at: str?, message: str?}}, allow_downstream_configuration: bool} # Response
@example_request {"name":"Check Commits","script":"scripts/commit_check.sh","enforcement":"disabled","allow_downstream_configuration":false,"script_repository":{"full_name":"DevIT/hooks"},"environment":{"id":2}}

@endpoint GET /admin/pre-receive-hooks/{pre_receive_hook_id}
@desc Get a pre-receive hook
@required {pre_receive_hook_id: int # pre_receive_hook_id parameter}
@returns(200) {id: int, name: str, enforcement: str, script: str, script_repository: map{id: int, full_name: str, url: str, html_url: str}, environment: map{id: int, name: str, image_url: str, url: str, html_url: str, default_environment: bool, created_at: str, hooks_count: int, download: map{url: str, state: str, downloaded_at: str?, message: str?}}, allow_downstream_configuration: bool} # Response

@endpoint PATCH /admin/pre-receive-hooks/{pre_receive_hook_id}
@desc Update a pre-receive hook
@required {pre_receive_hook_id: int # pre_receive_hook_id parameter}
@optional {name: str # The name of the hook., script: str # The script that the hook runs., script_repository: map{} # The GitHub repository where the script is kept., environment: map{} # The pre-receive environment where the script is executed., enforcement: str # The state of enforcement for this hook., allow_downstream_configuration: bool # Whether enforcement can be overridden at the org or repo level.}
@returns(200) {id: int, name: str, enforcement: str, script: str, script_repository: map{id: int, full_name: str, url: str, html_url: str}, environment: map{id: int, name: str, image_url: str, url: str, html_url: str, default_environment: bool, created_at: str, hooks_count: int, download: map{url: str, state: str, downloaded_at: str?, message: str?}}, allow_downstream_configuration: bool} # Response
@example_request {"name":"Check Commits","environment":{"id":1},"allow_downstream_configuration":true}

@endpoint DELETE /admin/pre-receive-hooks/{pre_receive_hook_id}
@desc Delete a pre-receive hook
@required {pre_receive_hook_id: int # pre_receive_hook_id parameter}
@returns(204) Response

@endpoint GET /admin/tokens
@desc List personal access tokens
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint DELETE /admin/tokens/{token_id}
@desc Delete a personal access token
@required {token_id: int}
@returns(204) Response

@endpoint POST /admin/users
@desc Create a user
@required {login: str # The user's username.}
@optional {email: str # **Required for built-in authentication.** The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For details on built-in and centrally-managed authentication, see the [GitHub authentication guide](https://help.github.com/enterprise/2.21/admin/guides/user-management/authenticating-users-for-your-github-enterprise-server-instance/).}
@returns(201) {name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str} # Response
@example_request {"login":"monalisa","email":"octocat@github.com"}

@endpoint PATCH /admin/users/{username}
@desc Update the username for a user
@required {username: str, login: str # The user's new username.}
@returns(202) {message: str, url: str} # Response
@example_request {"login":"thenewmonalisa"}

@endpoint DELETE /admin/users/{username}
@desc Delete a user
@required {username: str}
@returns(204) Response

@endpoint POST /admin/users/{username}/authorizations
@desc Create an impersonation OAuth token
@required {username: str}
@optional {scopes: [str] # A list of [scopes](https://docs.github.com/enterprise-server@2.21/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).}
@returns(201) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # Response

@endpoint DELETE /admin/users/{username}/authorizations
@desc Delete an impersonation OAuth token
@required {username: str}
@returns(204) Response

@endgroup

@group app
@endpoint GET /app
@desc Get the authenticated app
@returns(200) {id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str} # Response

@endgroup

@group app-manifests
@endpoint POST /app-manifests/{code}/conversions
@desc Create a GitHub App from a manifest
@required {code: str}
@returns(201) Response
@errors {404: Resource not found, 422: Validation failed}

@endgroup

@group app
@endpoint GET /app/installations
@desc List installations for the authenticated app
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change.}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) The permissions the installation has are included under the `permissions` key.

@endpoint GET /app/installations/{installation_id}
@desc Get an installation for the authenticated app
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change., installation_id: int # installation_id parameter}
@returns(200) {id: int, account: any?, repository_selection: str, access_tokens_url: str(uri), repositories_url: str(uri), html_url: str(uri), app_id: int, target_id: int, target_type: str, permissions: map{deployments: str, checks: str, metadata: str, contents: str, pull_requests: str, statuses: str, issues: str, organization_administration: str}, events: [str], created_at: str(date-time), updated_at: str(date-time), single_file_name: str?, app_slug: str, suspended_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, suspended_at: str(date-time)?, contact_email: str?} # Response
@errors {404: Resource not found, 415: Preview header missing}

@endpoint DELETE /app/installations/{installation_id}
@desc Delete an installation for the authenticated app
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change., installation_id: int # installation_id parameter}
@returns(204) Response
@errors {404: Resource not found}

@endpoint POST /app/installations/{installation_id}/access_tokens
@desc Create an installation access token for an app
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change., installation_id: int # installation_id parameter}
@optional {repositories: [str] # List of repository names that the token should have access to, repository_ids: [int] # List of repository IDs that the token should have access to, permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str} # The permissions granted to the user-to-server access token.}
@returns(201) {token: str, expires_at: str, permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, repositories: [map], single_file: str, has_multiple_single_files: bool, single_file_paths: [str]} # Response
@errors {401: Requires authentication, 403: Forbidden, 404: Resource not found, 415: Preview header missing, 422: Validation failed}

@endgroup

@group applications
@endpoint GET /applications/grants
@desc List your grants
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., client_id: str # The client ID of your GitHub app.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint GET /applications/grants/{grant_id}
@desc Get a single grant
@required {grant_id: int # grant_id parameter}
@returns(200) {id: int, url: str(uri), app: map{client_id: str, name: str, url: str(uri)}, created_at: str(date-time), updated_at: str(date-time), scopes: [str], user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint DELETE /applications/grants/{grant_id}
@desc Delete a grant
@required {grant_id: int # grant_id parameter}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint DELETE /applications/{client_id}/grant
@desc Delete an app authorization
@required {client_id: str # The client ID of your GitHub app.}
@optional {access_token: str # The OAuth access token used to authenticate to the GitHub API.}
@returns(204) Response
@errors {422: Validation failed}
@example_request {"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a"}

@endpoint DELETE /applications/{client_id}/grants/{access_token}
@desc Revoke a grant for an application
@required {client_id: str # The client ID of your GitHub app., access_token: str}
@returns(204) Response

@endpoint POST /applications/{client_id}/token
@desc Check a token
@required {client_id: str # The client ID of your GitHub app., access_token: str # The access_token of the OAuth application.}
@returns(200) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint PATCH /applications/{client_id}/token
@desc Reset a token
@required {client_id: str # The client ID of your GitHub app., access_token: str # The access_token of the OAuth application.}
@returns(200) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # Response
@errors {422: Validation failed}

@endpoint DELETE /applications/{client_id}/token
@desc Delete an app token
@required {client_id: str # The client ID of your GitHub app., access_token: str # The OAuth access token used to authenticate to the GitHub API.}
@returns(204) Response
@errors {422: Validation failed}
@example_request {"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a"}

@endpoint GET /applications/{client_id}/tokens/{access_token}
@desc Check an authorization
@required {client_id: str # The client ID of your GitHub app., access_token: str}
@returns(200) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # Response
@errors {404: Resource not found}

@endpoint POST /applications/{client_id}/tokens/{access_token}
@desc Reset an authorization
@required {client_id: str # The client ID of your GitHub app., access_token: str}
@returns(200) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # Response

@endpoint DELETE /applications/{client_id}/tokens/{access_token}
@desc Revoke an authorization for an application
@required {client_id: str # The client ID of your GitHub app., access_token: str}
@returns(204) Response

@endgroup

@group apps
@endpoint GET /apps/{app_slug}
@desc Get an app
@required {app_slug: str}
@returns(200) {id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str} # Response
@errors {403: Forbidden, 404: Resource not found, 415: Preview header missing}

@endgroup

@group authorizations
@endpoint GET /authorizations
@desc List your authorizations
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., client_id: str # The client ID of your GitHub app.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint POST /authorizations
@desc Create a new authorization
@optional {scopes: [str] # A list of scopes that this authorization is in., note: str # A note to remind you what the OAuth token is for., note_url: str # A URL to remind you what app the OAuth token is for., client_id: str # The OAuth app client key for which to create the token., client_secret: str # The OAuth app client secret for which to create the token., fingerprint: str # A unique string to distinguish an authorization from others created for the same client ID and user.}
@returns(201) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 410: Gone, 422: Validation failed}

@endpoint PUT /authorizations/clients/{client_id}
@desc Get-or-create an authorization for a specific app
@required {client_id: str # The client ID of your GitHub app., client_secret: str # The OAuth app client secret for which to create the token.}
@optional {scopes: [str] # A list of scopes that this authorization is in., note: str # A note to remind you what the OAuth token is for., note_url: str # A URL to remind you what app the OAuth token is for., fingerprint: str # A unique string to distinguish an authorization from others created for the same client ID and user.}
@returns(200) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # if returning an existing token
@returns(201) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.21/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.21/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.21/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 422: Validation failed}

@endpoint PUT /authorizations/clients/{client_id}/{fingerprint}
@desc Get-or-create an authorization for a specific app and fingerprint
@required {client_id: str # The client ID of your GitHub app., fingerprint: str, client_secret: str # The OAuth app client secret for which to create the token.}
@optional {scopes: [str] # A list of scopes that this authorization is in., note: str # A note to remind you what the OAuth token is for., note_url: str # A URL to remind you what app the OAuth token is for.}
@returns(200) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # if returning an existing token
@returns(201) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # Response if returning a new token
@errors {422: Validation failed}

@endpoint GET /authorizations/{authorization_id}
@desc Get a single authorization
@required {authorization_id: int # authorization_id parameter}
@returns(200) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint PATCH /authorizations/{authorization_id}
@desc Update an existing authorization
@required {authorization_id: int # authorization_id parameter}
@optional {scopes: [str] # A list of scopes that this authorization is in., add_scopes: [str] # A list of scopes to add to this authorization., remove_scopes: [str] # A list of scopes to remove from this authorization., note: str # A note to remind you what the OAuth token is for., note_url: str # A URL to remind you what app the OAuth token is for., fingerprint: str # A unique string to distinguish an authorization from others created for the same client ID and user.}
@returns(200) {id: int, url: str(uri), scopes: [str]?, token: str, token_last_eight: str?, hashed_token: str?, app: map{client_id: str, name: str, url: str(uri)}, note: str?, note_url: str(uri)?, updated_at: str(date-time), created_at: str(date-time), fingerprint: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, installation: map?{permissions: map{actions: str, administration: str, checks: str, content_references: str, contents: str, deployments: str, environments: str, issues: str, metadata: str, packages: str, pages: str, pull_requests: str, repository_hooks: str, repository_projects: str, secret_scanning_alerts: str, secrets: str, security_events: str, single_file: str, statuses: str, vulnerability_alerts: str, workflows: str, members: str, organization_administration: str, organization_hooks: str, organization_plan: str, organization_projects: str, organization_packages: str, organization_secrets: str, organization_self_hosted_runners: str, organization_user_blocking: str, team_discussions: str}, repository_selection: str, single_file_name: str?, has_multiple_single_files: bool, single_file_paths: [str], repositories_url: str(uri), account: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}} # Response
@errors {422: Validation failed}

@endpoint DELETE /authorizations/{authorization_id}
@desc Delete an authorization
@required {authorization_id: int # authorization_id parameter}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endgroup

@group codes_of_conduct
@endpoint GET /codes_of_conduct
@desc Get all codes of conduct
@returns(200) Response
@errors {304: Not modified}

@endpoint GET /codes_of_conduct/{key}
@desc Get a code of conduct
@required {key: str}
@returns(200) {key: str, name: str, url: str(uri), body: str, html_url: str(uri)?} # Response
@errors {304: Not modified, 404: Resource not found}

@endgroup

@group emojis
@endpoint GET /emojis
@desc Get emojis
@returns(200) Response
@errors {304: Not modified}

@endgroup

@group enterprise
@endpoint GET /enterprise/settings/license
@desc Get license information
@returns(200) {seats: any, seats_used: int, seats_available: any, kind: str, days_until_expiration: int, expire_at: str} # Response

@endpoint GET /enterprise/stats/all
@desc Get all statistics
@returns(200) {repos: map{total_repos: int, root_repos: int, fork_repos: int, org_repos: int, total_pushes: int, total_wikis: int}, hooks: map{total_hooks: int, active_hooks: int, inactive_hooks: int}, pages: map{total_pages: int}, orgs: map{total_orgs: int, disabled_orgs: int, total_teams: int, total_team_members: int}, users: map{total_users: int, admin_users: int, suspended_users: int}, pulls: map{total_pulls: int, merged_pulls: int, mergeable_pulls: int, unmergeable_pulls: int}, issues: map{total_issues: int, open_issues: int, closed_issues: int}, milestones: map{total_milestones: int, open_milestones: int, closed_milestones: int}, gists: map{total_gists: int, private_gists: int, public_gists: int}, comments: map{total_commit_comments: int, total_gist_comments: int, total_issue_comments: int, total_pull_request_comments: int}} # Response

@endpoint GET /enterprise/stats/comments
@desc Get comment statistics
@returns(200) {total_commit_comments: int, total_gist_comments: int, total_issue_comments: int, total_pull_request_comments: int} # Response

@endpoint GET /enterprise/stats/gists
@desc Get gist statistics
@returns(200) {total_gists: int, private_gists: int, public_gists: int} # Response

@endpoint GET /enterprise/stats/hooks
@desc Get hooks statistics
@returns(200) {total_hooks: int, active_hooks: int, inactive_hooks: int} # Response

@endpoint GET /enterprise/stats/issues
@desc Get issue statistics
@returns(200) {total_issues: int, open_issues: int, closed_issues: int} # Response

@endpoint GET /enterprise/stats/milestones
@desc Get milestone statistics
@returns(200) {total_milestones: int, open_milestones: int, closed_milestones: int} # Response

@endpoint GET /enterprise/stats/orgs
@desc Get organization statistics
@returns(200) {total_orgs: int, disabled_orgs: int, total_teams: int, total_team_members: int} # Response

@endpoint GET /enterprise/stats/pages
@desc Get pages statistics
@returns(200) {total_pages: int} # Response

@endpoint GET /enterprise/stats/pulls
@desc Get pull request statistics
@returns(200) {total_pulls: int, merged_pulls: int, mergeable_pulls: int, unmergeable_pulls: int} # Response

@endpoint GET /enterprise/stats/repos
@desc Get repository statistics
@returns(200) {total_repos: int, root_repos: int, fork_repos: int, org_repos: int, total_pushes: int, total_wikis: int} # Response

@endpoint GET /enterprise/stats/users
@desc Get users statistics
@returns(200) {total_users: int, admin_users: int, suspended_users: int} # Response

@endgroup

@group events
@endpoint GET /events
@desc List public events
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 403: Forbidden, 503: Service unavailable}

@endgroup

@group feeds
@endpoint GET /feeds
@desc Get feeds
@returns(200) {timeline_url: str, user_url: str, current_user_public_url: str, current_user_url: str, current_user_actor_url: str, current_user_organization_url: str, current_user_organization_urls: [str(uri)], _links: map{timeline: map{href: str, type: str}, user: map{href: str, type: str}, security_advisories: map{href: str, type: str}, current_user: map{href: str, type: str}, current_user_public: map{href: str, type: str}, current_user_actor: map{href: str, type: str}, current_user_organization: map{href: str, type: str}, current_user_organizations: [map]}} # Response

@endgroup

@group gists
@endpoint GET /gists
@desc List gists for the authenticated user
@optional {since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 403: Forbidden}

@endpoint POST /gists
@desc Create a gist
@required {files: map # Names and content for the files that make up the gist}
@optional {description: str # Description of the gist, public: any}
@returns(201) {forks: [map]?, history: [map]?, fork_of: map?{url: str(uri), forks_url: str(uri), commits_url: str(uri), id: str, node_id: str, git_pull_url: str(uri), git_push_url: str(uri), html_url: str(uri), files: map, public: bool, created_at: str(date-time), updated_at: str(date-time), description: str?, comments: int, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, comments_url: str(uri), owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, truncated: bool, forks: [any], history: [any]}, url: str, forks_url: str, commits_url: str, id: str, node_id: str, git_pull_url: str, git_push_url: str, html_url: str, files: map, public: bool, created_at: str, updated_at: str, description: str?, comments: int, user: str?, comments_url: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, truncated: bool} # Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint GET /gists/public
@desc List public gists
@optional {since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 403: Forbidden, 422: Validation failed}

@endpoint GET /gists/starred
@desc List starred gists
@optional {since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint GET /gists/{gist_id}
@desc Get a gist
@required {gist_id: str # gist_id parameter}
@returns(200) {forks: [map]?, history: [map]?, fork_of: map?{url: str(uri), forks_url: str(uri), commits_url: str(uri), id: str, node_id: str, git_pull_url: str(uri), git_push_url: str(uri), html_url: str(uri), files: map, public: bool, created_at: str(date-time), updated_at: str(date-time), description: str?, comments: int, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, comments_url: str(uri), owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, truncated: bool, forks: [any], history: [any]}, url: str, forks_url: str, commits_url: str, id: str, node_id: str, git_pull_url: str, git_push_url: str, html_url: str, files: map, public: bool, created_at: str, updated_at: str, description: str?, comments: int, user: str?, comments_url: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, truncated: bool} # Response
@errors {304: Not modified, 403: Forbidden Gist, 404: Resource not found}

@endpoint PATCH /gists/{gist_id}
@desc Update a gist
@required {gist_id: str # gist_id parameter}
@optional {description: str # Description of the gist, files: map # Names of files to be updated}
@returns(200) {forks: [map]?, history: [map]?, fork_of: map?{url: str(uri), forks_url: str(uri), commits_url: str(uri), id: str, node_id: str, git_pull_url: str(uri), git_push_url: str(uri), html_url: str(uri), files: map, public: bool, created_at: str(date-time), updated_at: str(date-time), description: str?, comments: int, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, comments_url: str(uri), owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, truncated: bool, forks: [any], history: [any]}, url: str, forks_url: str, commits_url: str, id: str, node_id: str, git_pull_url: str, git_push_url: str, html_url: str, files: map, public: bool, created_at: str, updated_at: str, description: str?, comments: int, user: str?, comments_url: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, truncated: bool} # Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint DELETE /gists/{gist_id}
@desc Delete a gist
@required {gist_id: str # gist_id parameter}
@returns(204) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint GET /gists/{gist_id}/comments
@desc List gist comments
@required {gist_id: str # gist_id parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint POST /gists/{gist_id}/comments
@desc Create a gist comment
@required {gist_id: str # gist_id parameter, body: str # The comment text.}
@returns(201) {id: int, node_id: str, url: str(uri), body: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), author_association: str} # Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint GET /gists/{gist_id}/comments/{comment_id}
@desc Get a gist comment
@required {gist_id: str # gist_id parameter, comment_id: int # comment_id parameter}
@returns(200) {id: int, node_id: str, url: str(uri), body: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), author_association: str} # Response
@errors {304: Not modified, 403: Forbidden Gist, 404: Resource not found}

@endpoint PATCH /gists/{gist_id}/comments/{comment_id}
@desc Update a gist comment
@required {gist_id: str # gist_id parameter, comment_id: int # comment_id parameter, body: str # The comment text.}
@returns(200) {id: int, node_id: str, url: str(uri), body: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), author_association: str} # Response
@errors {404: Resource not found}

@endpoint DELETE /gists/{gist_id}/comments/{comment_id}
@desc Delete a gist comment
@required {gist_id: str # gist_id parameter, comment_id: int # comment_id parameter}
@returns(204) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint GET /gists/{gist_id}/commits
@desc List gist commits
@required {gist_id: str # gist_id parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint GET /gists/{gist_id}/forks
@desc List gist forks
@required {gist_id: str # gist_id parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint POST /gists/{gist_id}/forks
@desc Fork a gist
@required {gist_id: str # gist_id parameter}
@returns(201) {url: str(uri), forks_url: str(uri), commits_url: str(uri), id: str, node_id: str, git_pull_url: str(uri), git_push_url: str(uri), html_url: str(uri), files: map, public: bool, created_at: str(date-time), updated_at: str(date-time), description: str?, comments: int, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, comments_url: str(uri), owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, truncated: bool, forks: [any], history: [any]} # Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint GET /gists/{gist_id}/star
@desc Check if a gist is starred
@required {gist_id: str # gist_id parameter}
@returns(204) Response if gist is starred
@errors {304: Not modified, 403: Forbidden, 404: Not Found if gist is not starred}

@endpoint PUT /gists/{gist_id}/star
@desc Star a gist
@required {gist_id: str # gist_id parameter}
@returns(204) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint DELETE /gists/{gist_id}/star
@desc Unstar a gist
@required {gist_id: str # gist_id parameter}
@returns(204) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint GET /gists/{gist_id}/{sha}
@desc Get a gist revision
@required {gist_id: str # gist_id parameter, sha: str}
@returns(200) {forks: [map]?, history: [map]?, fork_of: map?{url: str(uri), forks_url: str(uri), commits_url: str(uri), id: str, node_id: str, git_pull_url: str(uri), git_push_url: str(uri), html_url: str(uri), files: map, public: bool, created_at: str(date-time), updated_at: str(date-time), description: str?, comments: int, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, comments_url: str(uri), owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, truncated: bool, forks: [any], history: [any]}, url: str, forks_url: str, commits_url: str, id: str, node_id: str, git_pull_url: str, git_push_url: str, html_url: str, files: map, public: bool, created_at: str, updated_at: str, description: str?, comments: int, user: str?, comments_url: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, truncated: bool} # Response
@errors {403: Forbidden, 404: Resource not found, 422: Validation failed}

@endgroup

@group gitignore
@endpoint GET /gitignore/templates
@desc Get all gitignore templates
@returns(200) Response
@errors {304: Not modified}

@endpoint GET /gitignore/templates/{name}
@desc Get a gitignore template
@required {name: str}
@returns(200) {name: str, source: str} # Response
@errors {304: Not modified}

@endgroup

@group installation
@endpoint GET /installation/repositories
@desc List repositories accessible to the app installation
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change.}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, repositories: [map], repository_selection: str} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint DELETE /installation/token
@desc Revoke an installation access token
@returns(204) Response

@endgroup

@group issues
@endpoint GET /issues
@desc List issues assigned to the authenticated user
@optional {filter: str(assigned/created/mentioned/subscribed/repos/all)=assigned # Indicates which sorts of issues to return. Can be one of:   \* `assigned`: Issues assigned to you   \* `created`: Issues created by you   \* `mentioned`: Issues mentioning you   \* `subscribed`: Issues you're subscribed to updates for   \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation, state: str(open/closed/all)=open # Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`., labels: str # A list of comma separated label names. Example: `bug,ui,@high`, sort: str(created/updated/comments)=created # What to sort results by. Can be either `created`, `updated`, `comments`., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., collab: bool, orgs: bool, owned: bool, pulls: bool, per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 404: Resource not found, 422: Validation failed}

@endgroup

@group licenses
@endpoint GET /licenses
@desc Get all commonly used licenses
@optional {featured: bool, per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified}

@endpoint GET /licenses/{license}
@desc Get a license
@required {license: str}
@returns(200) {key: str, name: str, spdx_id: str?, url: str(uri)?, node_id: str, html_url: str(uri), description: str, implementation: str, permissions: [str], conditions: [str], limitations: [str], body: str, featured: bool} # Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endgroup

@group markdown
@endpoint POST /markdown
@desc Render a Markdown document
@required {text: str # The Markdown text to render in HTML.}
@optional {mode: str(markdown/gfm)=markdown # The rendering mode., context: str # The repository context to use when creating references in `gfm` mode.}
@returns(200) Response
@errors {304: Not modified}

@endpoint POST /markdown/raw
@desc Render a Markdown document in raw mode
@returns(200) Response
@errors {304: Not modified}

@endgroup

@group meta
@endpoint GET /meta
@desc Get GitHub Enterprise Server meta information
@returns(200) {verifiable_password_authentication: bool, packages: [str], dependabot: [str], installed_version: str} # Response
@errors {304: Not modified}

@endgroup

@group networks
@endpoint GET /networks/{owner}/{repo}/events
@desc List public events for a network of repositories
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {301: Moved permanently, 304: Not modified, 403: Forbidden, 404: Resource not found}

@endgroup

@group notifications
@endpoint GET /notifications
@desc List notifications for the authenticated user
@optional {all: bool=false # If `true`, show notifications marked as read., participating: bool=false # If `true`, only shows notifications in which the user is directly participating or mentioned., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., before: str(date-time) # Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 422: Validation failed}

@endpoint PUT /notifications
@desc Mark notifications as read
@optional {last_read_at: str(date-time) # Describes the last point that notifications were checked., read: bool # Whether the notification has been read.}
@returns(202) {message: str} # Response
@returns(205) Reset Content
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint GET /notifications/threads/{thread_id}
@desc Get a thread
@required {thread_id: int # thread_id parameter}
@returns(200) {id: str, repository: map{id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str?, hooks_url: str(uri), svn_url: str, homepage: str?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, delete_branch_on_merge: bool, subscribers_count: int, network_count: int, code_of_conduct: map{key: str, name: str, url: str(uri), body: str, html_url: str(uri)?}, license: map?{key: str, name: str, spdx_id: str, url: str, node_id: str}, forks: int, open_issues: int, watchers: int, allow_forking: bool, anonymous_access_enabled: bool}, subject: map{title: str, url: str, latest_comment_url: str, type: str}, reason: str, unread: bool, updated_at: str, last_read_at: str?, url: str, subscription_url: str} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint PATCH /notifications/threads/{thread_id}
@desc Mark a thread as read
@required {thread_id: int # thread_id parameter}
@returns(205) Reset Content
@errors {304: Not modified, 403: Forbidden}

@endpoint GET /notifications/threads/{thread_id}/subscription
@desc Get a thread subscription for the authenticated user
@required {thread_id: int # thread_id parameter}
@returns(200) {subscribed: bool, ignored: bool, reason: str?, created_at: str(date-time)?, url: str(uri), thread_url: str(uri), repository_url: str(uri)} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint PUT /notifications/threads/{thread_id}/subscription
@desc Set a thread subscription
@required {thread_id: int # thread_id parameter}
@optional {ignored: bool=false # Whether to block all notifications from a thread.}
@returns(200) {subscribed: bool, ignored: bool, reason: str?, created_at: str(date-time)?, url: str(uri), thread_url: str(uri), repository_url: str(uri)} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint DELETE /notifications/threads/{thread_id}/subscription
@desc Delete a thread subscription
@required {thread_id: int # thread_id parameter}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endgroup

@group octocat
@endpoint GET /octocat
@desc Get Octocat
@optional {s: str # The words to show in Octocat's speech bubble}
@returns(200) Response

@endgroup

@group organizations
@endpoint GET /organizations
@desc List organizations
@optional {since: int # An organization ID. Only return organizations with an ID greater than this ID., per_page: int=30 # Results per page (max 100)}
@returns(200) Response
@errors {304: Not modified}

@endgroup

@group orgs
@endpoint GET /orgs/{org}
@desc Get an organization
@required {org: str}
@returns(200) {login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?, name: str, company: str, blog: str(uri), location: str, email: str(email), has_organization_projects: bool, has_repository_projects: bool, public_repos: int, public_gists: int, followers: int, following: int, html_url: str(uri), created_at: str(date-time), type: str, total_private_repos: int, owned_private_repos: int, private_gists: int?, disk_usage: int?, collaborators: int?, billing_email: str(email)?, plan: map{name: str, space: int, private_repos: int, filled_seats: int, seats: int}, default_repository_permission: str?, members_can_create_repositories: bool?, two_factor_requirement_enabled: bool?, members_allowed_repository_creation_type: str, members_can_create_public_repositories: bool, members_can_create_private_repositories: bool, members_can_create_internal_repositories: bool, members_can_create_pages: bool, members_can_create_public_pages: bool, members_can_create_private_pages: bool, updated_at: str(date-time)} # Response
@errors {404: Resource not found}

@endpoint PATCH /orgs/{org}
@desc Update an organization
@required {org: str}
@optional {billing_email: str # Billing email address. This address is not publicized., company: str # The company name., email: str # The publicly visible email address., twitter_username: str # The Twitter username of the company., location: str # The location., name: str # The shorthand name of the company., description: str # The description of the company., has_organization_projects: bool # Toggles whether an organization can use organization projects., has_repository_projects: bool # Toggles whether repositories that belong to the organization can use repository projects., default_repository_permission: str(read/write/admin/none)=read # Default permission level members have for organization repositories:   \* `read` - can pull, but not push to or administer this repository.   \* `write` - can pull and push, but not administer this repository.   \* `admin` - can pull, push, and administer this repository.   \* `none` - no permissions granted by default., members_can_create_repositories: bool=true # Toggles the ability of non-admin organization members to create repositories. Can be one of:   \* `true` - all organization members can create repositories.   \* `false` - only organization owners can create repositories.   Default: `true`   **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details., members_can_create_internal_repositories: bool # Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of:   \* `true` - all organization members can create internal repositories.   \* `false` - only organization owners can create internal repositories.   Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation., members_can_create_private_repositories: bool # Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of:   \* `true` - all organization members can create private repositories.   \* `false` - only organization owners can create private repositories.   Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation., members_can_create_public_repositories: bool # Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of:   \* `true` - all organization members can create public repositories.   \* `false` - only organization owners can create public repositories.   Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation., members_allowed_repository_creation_type: str(all/private/none) # Specifies which types of repositories non-admin organization members can create. Can be one of:   \* `all` - all organization members can create public and private repositories.   \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud.   \* `none` - only admin members can create repositories.   **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details., blog: str}
@returns(200) {login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?, name: str, company: str, blog: str(uri), location: str, email: str(email), has_organization_projects: bool, has_repository_projects: bool, public_repos: int, public_gists: int, followers: int, following: int, html_url: str(uri), created_at: str(date-time), type: str, total_private_repos: int, owned_private_repos: int, private_gists: int?, disk_usage: int?, collaborators: int?, billing_email: str(email)?, plan: map{name: str, space: int, private_repos: int, filled_seats: int, seats: int}, default_repository_permission: str?, members_can_create_repositories: bool?, two_factor_requirement_enabled: bool?, members_allowed_repository_creation_type: str, members_can_create_public_repositories: bool, members_can_create_private_repositories: bool, members_can_create_internal_repositories: bool, members_can_create_pages: bool, members_can_create_public_pages: bool, members_can_create_private_pages: bool, updated_at: str(date-time)} # Response
@errors {409: Conflict, 415: Preview header missing, 422: Validation failed}
@example_request {"billing_email":"mona@github.com","company":"GitHub","email":"mona@github.com","twitter_username":"github","location":"San Francisco","name":"github","description":"GitHub, the company.","default_repository_permission":"read","members_can_create_repositories":true,"members_allowed_repository_creation_type":"all"}

@endpoint GET /orgs/{org}/events
@desc List public organization events
@required {org: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /orgs/{org}/hooks
@desc List organization webhooks
@required {org: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /orgs/{org}/hooks
@desc Create an organization webhook
@required {org: str, name: str # Must be passed as "web"., config: map{url!: str(uri), content_type: str, secret: str, insecure_ssl: any, username: str, password: str} # Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.21/rest/reference/orgs#create-hook-config-params).}
@optional {events: [str]=push # Determines what [events](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads) the hook is triggered for., active: bool=true # Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.}
@returns(201) {id: int, url: str(uri), ping_url: str(uri), name: str, events: [str], active: bool, config: map{url: str, insecure_ssl: str, content_type: str, secret: str}, updated_at: str(date-time), created_at: str(date-time), type: str} # Response
@errors {404: Resource not found, 422: Validation failed}
@example_request {"name":"web","active":true,"events":["push","pull_request"],"config":{"url":"http://example.com/webhook","content_type":"json"}}

@endpoint GET /orgs/{org}/hooks/{hook_id}
@desc Get an organization webhook
@required {org: str, hook_id: int}
@returns(200) {id: int, url: str(uri), ping_url: str(uri), name: str, events: [str], active: bool, config: map{url: str, insecure_ssl: str, content_type: str, secret: str}, updated_at: str(date-time), created_at: str(date-time), type: str} # Response
@errors {404: Resource not found}

@endpoint PATCH /orgs/{org}/hooks/{hook_id}
@desc Update an organization webhook
@required {org: str, hook_id: int}
@optional {config: map{url!: str(uri), content_type: str, secret: str, insecure_ssl: any} # Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.21/rest/reference/orgs#update-hook-config-params)., events: [str]=push # Determines what [events](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads) the hook is triggered for., active: bool=true # Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications., name: str}
@returns(200) {id: int, url: str(uri), ping_url: str(uri), name: str, events: [str], active: bool, config: map{url: str, insecure_ssl: str, content_type: str, secret: str}, updated_at: str(date-time), created_at: str(date-time), type: str} # Response
@errors {404: Resource not found, 422: Validation failed}
@example_request {"active":true,"events":["pull_request"]}

@endpoint DELETE /orgs/{org}/hooks/{hook_id}
@desc Delete an organization webhook
@required {org: str, hook_id: int}
@returns(204) Response
@errors {404: Resource not found}

@endpoint POST /orgs/{org}/hooks/{hook_id}/pings
@desc Ping an organization webhook
@required {org: str, hook_id: int}
@returns(204) Response
@errors {404: Resource not found}

@endpoint GET /orgs/{org}/installation
@desc Get an organization installation for the authenticated app
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change., org: str}
@returns(200) {id: int, account: any?, repository_selection: str, access_tokens_url: str(uri), repositories_url: str(uri), html_url: str(uri), app_id: int, target_id: int, target_type: str, permissions: map{deployments: str, checks: str, metadata: str, contents: str, pull_requests: str, statuses: str, issues: str, organization_administration: str}, events: [str], created_at: str(date-time), updated_at: str(date-time), single_file_name: str?, app_slug: str, suspended_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, suspended_at: str(date-time)?, contact_email: str?} # Response

@endpoint GET /orgs/{org}/installations
@desc List app installations for an organization
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change., org: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, installations: [map]} # Response

@endpoint GET /orgs/{org}/issues
@desc List organization issues assigned to the authenticated user
@required {org: str}
@optional {filter: str(assigned/created/mentioned/subscribed/repos/all)=assigned # Indicates which sorts of issues to return. Can be one of:   \* `assigned`: Issues assigned to you   \* `created`: Issues created by you   \* `mentioned`: Issues mentioning you   \* `subscribed`: Issues you're subscribed to updates for   \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation, state: str(open/closed/all)=open # Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`., labels: str # A list of comma separated label names. Example: `bug,ui,@high`, sort: str(created/updated/comments)=created # What to sort results by. Can be either `created`, `updated`, `comments`., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint GET /orgs/{org}/members
@desc List organization members
@required {org: str}
@optional {filter: str(2fa_disabled/all)=all # Filter members returned in the list. Can be one of:   \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners.   \* `all` - All members the authenticated user can see., role: str(all/admin/member)=all # Filter members returned by their role. Can be one of:   \* `all` - All members of the organization, regardless of role.   \* `admin` - Organization owners.   \* `member` - Non-owner organization members., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {302: Response if requester is not an organization member, 422: Validation failed}

@endpoint GET /orgs/{org}/members/{username}
@desc Check organization membership for a user
@required {org: str, username: str}
@returns(204) Response if requester is an organization member and user is a member
@errors {302: Response if requester is not an organization member, 404: Not Found if requester is an organization member and user is not a member}

@endpoint DELETE /orgs/{org}/members/{username}
@desc Remove an organization member
@required {org: str, username: str}
@returns(204) Response
@errors {403: Forbidden}

@endpoint GET /orgs/{org}/memberships/{username}
@desc Get organization membership for a user
@required {org: str, username: str}
@returns(200) {url: str(uri), state: str, role: str, organization_url: str(uri), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?}, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, permissions: map{can_create_repository: bool}} # Response
@errors {403: Forbidden, 404: Resource not found}

@endpoint PUT /orgs/{org}/memberships/{username}
@desc Set organization membership for a user
@required {org: str, username: str}
@optional {role: str(admin/member)=member # The role to give the user in the organization. Can be one of:   \* `admin` - The user will become an owner of the organization.   \* `member` - The user will become a non-owner member of the organization.}
@returns(200) {url: str(uri), state: str, role: str, organization_url: str(uri), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?}, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, permissions: map{can_create_repository: bool}} # Response
@errors {403: Forbidden, 422: Validation failed}

@endpoint DELETE /orgs/{org}/memberships/{username}
@desc Remove organization membership for a user
@required {org: str, username: str}
@returns(204) Response
@errors {403: Forbidden, 404: Resource not found}

@endpoint GET /orgs/{org}/outside_collaborators
@desc List outside collaborators for an organization
@required {org: str}
@optional {filter: str(2fa_disabled/all)=all # Filter the list of outside collaborators. Can be one of:   \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled.   \* `all`: All outside collaborators., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint PUT /orgs/{org}/outside_collaborators/{username}
@desc Convert an organization member to outside collaborator
@required {org: str, username: str}
@returns(202) User is getting converted asynchronously
@returns(204) User was converted
@errors {403: Forbidden if user is the last owner of the organization or not a member of the organization, 404: Resource not found}

@endpoint DELETE /orgs/{org}/outside_collaborators/{username}
@desc Remove outside collaborator from an organization
@required {org: str, username: str}
@returns(204) Response
@errors {422: Unprocessable Entity if user is a member of the organization}

@endpoint GET /orgs/{org}/pre-receive-hooks
@desc List pre-receive hooks for an organization
@required {org: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., sort: str(created/updated/name)=created # The sort order for the response collection.}
@returns(200) Response

@endpoint GET /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}
@desc Get a pre-receive hook for an organization
@required {org: str, pre_receive_hook_id: int # pre_receive_hook_id parameter}
@returns(200) {id: int, name: str, enforcement: str, configuration_url: str, allow_downstream_configuration: bool} # Response

@endpoint PATCH /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}
@desc Update pre-receive hook enforcement for an organization
@required {org: str, pre_receive_hook_id: int # pre_receive_hook_id parameter}
@optional {enforcement: str # The state of enforcement for the hook on this repository., allow_downstream_configuration: bool # Whether repositories can override enforcement.}
@returns(200) {id: int, name: str, enforcement: str, configuration_url: str, allow_downstream_configuration: bool} # Response
@example_request {"enforcement":"enabled","allow_downstream_configuration":false}

@endpoint DELETE /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}
@desc Remove pre-receive hook enforcement for an organization
@required {org: str, pre_receive_hook_id: int # pre_receive_hook_id parameter}
@returns(200) {id: int, name: str, enforcement: str, configuration_url: str, allow_downstream_configuration: bool} # Response

@endpoint GET /orgs/{org}/projects
@desc List organization projects
@required {org: str}
@optional {state: str(open/closed/all)=open # Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint POST /orgs/{org}/projects
@desc Create an organization project
@required {org: str, name: str # The name of the project.}
@optional {body: str # The description of the project.}
@returns(201) {owner_url: str(uri), url: str(uri), html_url: str(uri), columns_url: str(uri), id: int, node_id: str, name: str, body: str?, number: int, state: str, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), organization_permission: str, private: bool} # Response
@errors {401: Requires authentication, 403: Forbidden, 404: Resource not found, 410: Gone, 422: Validation failed}
@example_request {"name":"Organization Roadmap","body":"High-level roadmap for the upcoming year."}

@endpoint GET /orgs/{org}/public_members
@desc List public organization members
@required {org: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /orgs/{org}/public_members/{username}
@desc Check public organization membership for a user
@required {org: str, username: str}
@returns(204) Response if user is a public member
@errors {404: Not Found if user is not a public member}

@endpoint PUT /orgs/{org}/public_members/{username}
@desc Set public organization membership for the authenticated user
@required {org: str, username: str}
@returns(204) Response
@errors {403: Forbidden}

@endpoint DELETE /orgs/{org}/public_members/{username}
@desc Remove public organization membership for the authenticated user
@required {org: str, username: str}
@returns(204) Response

@endpoint GET /orgs/{org}/repos
@desc List organization repositories
@required {org: str}
@optional {type: str(all/public/private/forks/sources/member/internal) # Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token., sort: str(created/updated/pushed/full_name)=created # Can be one of `created`, `updated`, `pushed`, `full_name`., direction: str(asc/desc) # Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc`, per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /orgs/{org}/repos
@desc Create an organization repository
@required {org: str, name: str # The name of the repository.}
@optional {description: str # A short description of the repository., homepage: str # A URL with more information about the repository., private: bool=false # Whether the repository is private., visibility: str(public/private/visibility/internal) # Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation.   The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header., has_issues: bool=true # Either `true` to enable issues for this repository or `false` to disable them., has_projects: bool=true # Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error., has_wiki: bool=true # Either `true` to enable the wiki for this repository or `false` to disable it., is_template: bool=false # Either `true` to make this repo available as a template repository or `false` to prevent it., team_id: int # The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization., auto_init: bool=false # Pass `true` to create an initial commit with empty README., gitignore_template: str # Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell"., license_template: str # Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0"., allow_squash_merge: bool=true # Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging., allow_merge_commit: bool=true # Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits., allow_rebase_merge: bool=true # Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging., delete_branch_on_merge: bool=false # Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion.}
@returns(201) {id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool} # Response
@errors {403: Forbidden, 422: Validation failed}
@example_request {"name":"Hello-World","description":"This is your first repository","homepage":"https://github.com","private":false,"has_issues":true,"has_projects":true,"has_wiki":true}

@endpoint GET /orgs/{org}/teams
@desc List teams
@required {org: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {403: Forbidden}

@endpoint POST /orgs/{org}/teams
@desc Create a team
@required {org: str, name: str # The name of the team.}
@optional {description: str # The description of the team., maintainers: [str] # List GitHub IDs for organization members who will become team maintainers., repo_names: [str] # The full name (e.g., "organization-name/repository-name") of repositories to add the team to., privacy: str(secret/closed) # The level of privacy this team should have. The options are:   **For a non-nested team:**   \* `secret` - only visible to organization owners and members of this team.   \* `closed` - visible to all members of this organization.   Default: `secret`   **For a parent or child team:**   \* `closed` - visible to all members of this organization.   Default for child team: `closed`, permission: str(pull/push/admin)=pull # **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:   \* `pull` - team members can pull, but not push to or administer newly-added repositories.   \* `push` - team members can pull and push, but not administer newly-added repositories.   \* `admin` - team members can pull, push and administer newly-added repositories., parent_team_id: int # The ID of a team to set as the parent team.}
@returns(201) {id: int, node_id: str, url: str(uri), html_url: str(uri), name: str, slug: str, description: str?, privacy: str, permission: str, members_url: str, repositories_url: str(uri), parent: map?{id: int, node_id: str, url: str(uri), members_url: str, name: str, description: str?, permission: str, privacy: str, html_url: str(uri), repositories_url: str(uri), slug: str, ldap_dn: str}, members_count: int, repos_count: int, created_at: str(date-time), updated_at: str(date-time), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?, name: str, company: str, blog: str(uri), location: str, email: str(email), has_organization_projects: bool, has_repository_projects: bool, public_repos: int, public_gists: int, followers: int, following: int, html_url: str(uri), created_at: str(date-time), type: str, total_private_repos: int, owned_private_repos: int, private_gists: int?, disk_usage: int?, collaborators: int?, billing_email: str(email)?, plan: map{name: str, space: int, private_repos: int, filled_seats: int, seats: int}, default_repository_permission: str?, members_can_create_repositories: bool?, two_factor_requirement_enabled: bool?, members_allowed_repository_creation_type: str, members_can_create_public_repositories: bool, members_can_create_private_repositories: bool, members_can_create_internal_repositories: bool, members_can_create_pages: bool, members_can_create_public_pages: bool, members_can_create_private_pages: bool, updated_at: str(date-time)}, ldap_dn: str} # Response
@errors {403: Forbidden, 422: Validation failed}
@example_request {"name":"Justice League","description":"A great team","permission":"admin","privacy":"closed"}

@endpoint GET /orgs/{org}/teams/{team_slug}
@desc Get a team by name
@required {org: str, team_slug: str # team_slug parameter}
@returns(200) {id: int, node_id: str, url: str(uri), html_url: str(uri), name: str, slug: str, description: str?, privacy: str, permission: str, members_url: str, repositories_url: str(uri), parent: map?{id: int, node_id: str, url: str(uri), members_url: str, name: str, description: str?, permission: str, privacy: str, html_url: str(uri), repositories_url: str(uri), slug: str, ldap_dn: str}, members_count: int, repos_count: int, created_at: str(date-time), updated_at: str(date-time), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?, name: str, company: str, blog: str(uri), location: str, email: str(email), has_organization_projects: bool, has_repository_projects: bool, public_repos: int, public_gists: int, followers: int, following: int, html_url: str(uri), created_at: str(date-time), type: str, total_private_repos: int, owned_private_repos: int, private_gists: int?, disk_usage: int?, collaborators: int?, billing_email: str(email)?, plan: map{name: str, space: int, private_repos: int, filled_seats: int, seats: int}, default_repository_permission: str?, members_can_create_repositories: bool?, two_factor_requirement_enabled: bool?, members_allowed_repository_creation_type: str, members_can_create_public_repositories: bool, members_can_create_private_repositories: bool, members_can_create_internal_repositories: bool, members_can_create_pages: bool, members_can_create_public_pages: bool, members_can_create_private_pages: bool, updated_at: str(date-time)}, ldap_dn: str} # Response
@errors {404: Resource not found}

@endpoint PATCH /orgs/{org}/teams/{team_slug}
@desc Update a team
@required {org: str, team_slug: str # team_slug parameter}
@optional {name: str # The name of the team., description: str # The description of the team., privacy: str(secret/closed) # The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are:   **For a non-nested team:**   \* `secret` - only visible to organization owners and members of this team.   \* `closed` - visible to all members of this organization.   **For a parent or child team:**   \* `closed` - visible to all members of this organization., permission: str(pull/push/admin)=pull # **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:   \* `pull` - team members can pull, but not push to or administer newly-added repositories.   \* `push` - team members can pull and push, but not administer newly-added repositories.   \* `admin` - team members can pull, push and administer newly-added repositories., parent_team_id: int # The ID of a team to set as the parent team.}
@returns(201) {id: int, node_id: str, url: str(uri), html_url: str(uri), name: str, slug: str, description: str?, privacy: str, permission: str, members_url: str, repositories_url: str(uri), parent: map?{id: int, node_id: str, url: str(uri), members_url: str, name: str, description: str?, permission: str, privacy: str, html_url: str(uri), repositories_url: str(uri), slug: str, ldap_dn: str}, members_count: int, repos_count: int, created_at: str(date-time), updated_at: str(date-time), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?, name: str, company: str, blog: str(uri), location: str, email: str(email), has_organization_projects: bool, has_repository_projects: bool, public_repos: int, public_gists: int, followers: int, following: int, html_url: str(uri), created_at: str(date-time), type: str, total_private_repos: int, owned_private_repos: int, private_gists: int?, disk_usage: int?, collaborators: int?, billing_email: str(email)?, plan: map{name: str, space: int, private_repos: int, filled_seats: int, seats: int}, default_repository_permission: str?, members_can_create_repositories: bool?, two_factor_requirement_enabled: bool?, members_allowed_repository_creation_type: str, members_can_create_public_repositories: bool, members_can_create_private_repositories: bool, members_can_create_internal_repositories: bool, members_can_create_pages: bool, members_can_create_public_pages: bool, members_can_create_private_pages: bool, updated_at: str(date-time)}, ldap_dn: str} # Response
@example_request {"name":"new team name","description":"new team description","privacy":"closed"}

@endpoint DELETE /orgs/{org}/teams/{team_slug}
@desc Delete a team
@required {org: str, team_slug: str # team_slug parameter}
@returns(204) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/discussions
@desc List discussions
@required {org: str, team_slug: str # team_slug parameter}
@optional {direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., pinned: str # Pinned discussions only filter}
@returns(200) Response

@endpoint POST /orgs/{org}/teams/{team_slug}/discussions
@desc Create a discussion
@required {org: str, team_slug: str # team_slug parameter, title: str # The discussion post's title., body: str # The discussion post's body text.}
@optional {private: bool=false # Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post.}
@returns(201) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, comments_count: int, comments_url: str(uri), created_at: str(date-time), last_edited_at: str(date-time)?, html_url: str(uri), node_id: str, number: int, pinned: bool, private: bool, team_url: str(uri), title: str, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@example_request {"title":"Our first team post","body":"Hi! This is an area for us to collaborate as a team."}

@endpoint GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}
@desc Get a discussion
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int}
@returns(200) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, comments_count: int, comments_url: str(uri), created_at: str(date-time), last_edited_at: str(date-time)?, html_url: str(uri), node_id: str, number: int, pinned: bool, private: bool, team_url: str(uri), title: str, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response

@endpoint PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}
@desc Update a discussion
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int}
@optional {title: str # The discussion post's title., body: str # The discussion post's body text.}
@returns(200) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, comments_count: int, comments_url: str(uri), created_at: str(date-time), last_edited_at: str(date-time)?, html_url: str(uri), node_id: str, number: int, pinned: bool, private: bool, team_url: str(uri), title: str, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@example_request {"title":"Welcome to our first team post"}

@endpoint DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}
@desc Delete a discussion
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int}
@returns(204) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments
@desc List discussion comments
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int}
@optional {direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments
@desc Create a discussion comment
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int, body: str # The discussion comment's body text.}
@returns(201) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, created_at: str(date-time), last_edited_at: str(date-time)?, discussion_url: str(uri), html_url: str(uri), node_id: str, number: int, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@example_request {"body":"Do you like apples?"}

@endpoint GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}
@desc Get a discussion comment
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int, comment_number: int}
@returns(200) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, created_at: str(date-time), last_edited_at: str(date-time)?, discussion_url: str(uri), html_url: str(uri), node_id: str, number: int, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response

@endpoint PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}
@desc Update a discussion comment
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int, comment_number: int, body: str # The discussion comment's body text.}
@returns(200) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, created_at: str(date-time), last_edited_at: str(date-time)?, discussion_url: str(uri), html_url: str(uri), node_id: str, number: int, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@example_request {"body":"Do you like pineapples?"}

@endpoint DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}
@desc Delete a discussion comment
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int, comment_number: int}
@returns(204) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions
@desc List reactions for a team discussion comment
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int, comment_number: int}
@optional {content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # Returns a single [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions
@desc Create reaction for a team discussion comment
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int, comment_number: int, content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # The [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types) to add to the team discussion comment.}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Response
@returns(201) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Response
@example_request {"content":"heart"}

@endpoint DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}
@desc Delete team discussion comment reaction
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int, comment_number: int, reaction_id: int}
@returns(204) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions
@desc List reactions for a team discussion
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int}
@optional {content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # Returns a single [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions
@desc Create reaction for a team discussion
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int, content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # The [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types) to add to the team discussion.}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Response
@returns(201) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Response
@example_request {"content":"heart"}

@endpoint DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}
@desc Delete team discussion reaction
@required {org: str, team_slug: str # team_slug parameter, discussion_number: int, reaction_id: int}
@returns(204) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/members
@desc List team members
@required {org: str, team_slug: str # team_slug parameter}
@optional {role: str(member/maintainer/all)=all # Filters members returned by their role in the team. Can be one of:   \* `member` - normal members of the team.   \* `maintainer` - team maintainers.   \* `all` - all members of the team., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/memberships/{username}
@desc Get team membership for a user
@required {org: str, team_slug: str # team_slug parameter, username: str}
@returns(200) {url: str(uri), role: str, state: str} # Response
@errors {404: if user has no team membership}

@endpoint PUT /orgs/{org}/teams/{team_slug}/memberships/{username}
@desc Add or update team membership for a user
@required {org: str, team_slug: str # team_slug parameter, username: str}
@optional {role: str(member/maintainer)=member # The role that this user should have in the team. Can be one of:   \* `member` - a normal member of the team.   \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.}
@returns(200) {url: str(uri), role: str, state: str} # Response
@errors {403: Forbidden if team synchronization is set up, 422: Unprocessable Entity if you attempt to add an organization to a team}

@endpoint DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}
@desc Remove team membership for a user
@required {org: str, team_slug: str # team_slug parameter, username: str}
@returns(204) Response
@errors {403: Forbidden if team synchronization is set up}

@endpoint GET /orgs/{org}/teams/{team_slug}/projects
@desc List team projects
@required {org: str, team_slug: str # team_slug parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/projects/{project_id}
@desc Check team permissions for a project
@required {org: str, team_slug: str # team_slug parameter, project_id: int}
@returns(200) {owner_url: str, url: str, html_url: str, columns_url: str, id: int, node_id: str, name: str, body: str?, number: int, state: str, creator: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str, updated_at: str, organization_permission: str, private: bool, permissions: map{read: bool, write: bool, admin: bool}} # Response
@errors {404: Not Found if project is not managed by this team}

@endpoint PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}
@desc Add or update team project permissions
@required {org: str, team_slug: str # team_slug parameter, project_id: int}
@optional {permission: str(read/write/admin) # The permission to grant to the team for this project. Can be one of:   \* `read` - team members can read, but not write to or administer this project.   \* `write` - team members can read and write, but not administer this project.   \* `admin` - team members can read, write and administer this project.   Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. 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](https://docs.github.com/enterprise-server@2.21/rest/overview/resources-in-the-rest-api#http-verbs)."}
@returns(204) Response
@errors {403: Forbidden if the project is not owned by the organization}

@endpoint DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}
@desc Remove a project from a team
@required {org: str, team_slug: str # team_slug parameter, project_id: int}
@returns(204) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/repos
@desc List team repositories
@required {org: str, team_slug: str # team_slug parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}
@desc Check team permissions for a repository
@required {org: str, team_slug: str # team_slug parameter, owner: str, repo: str}
@returns(200) {id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, anonymous_access_enabled: bool} # Alternative response with repository permissions
@returns(204) Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header.
@errors {404: Not Found if team does not have permission for the repository}

@endpoint PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}
@desc Add or update team repository permissions
@required {org: str, team_slug: str # team_slug parameter, owner: str, repo: str}
@optional {permission: str(pull/push/admin/maintain/triage) # The permission to grant the team on this repository. Can be one of:   \* `pull` - team members can pull, but not push to or administer this repository.   \* `push` - team members can pull and push, but not administer this repository.   \* `admin` - team members can pull, push and administer this repository.   \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations.   \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations.      If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository.}
@returns(204) Response

@endpoint DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}
@desc Remove a repository from a team
@required {org: str, team_slug: str # team_slug parameter, owner: str, repo: str}
@returns(204) Response

@endpoint GET /orgs/{org}/teams/{team_slug}/teams
@desc List child teams
@required {org: str, team_slug: str # team_slug parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) if child teams exist

@endgroup

@group projects
@endpoint GET /projects/columns/cards/{card_id}
@desc Get a project card
@required {card_id: int # card_id parameter}
@returns(200) {url: str(uri), id: int, node_id: str, note: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), archived: bool, column_name: str, project_id: str, column_url: str(uri), content_url: str(uri), project_url: str(uri)} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint PATCH /projects/columns/cards/{card_id}
@desc Update an existing project card
@required {card_id: int # card_id parameter}
@optional {note: str # The project card's note, archived: bool # Whether or not the card is archived}
@returns(200) {url: str(uri), id: int, node_id: str, note: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), archived: bool, column_name: str, project_id: str, column_url: str(uri), content_url: str(uri), project_url: str(uri)} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint DELETE /projects/columns/cards/{card_id}
@desc Delete a project card
@required {card_id: int # card_id parameter}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint POST /projects/columns/cards/{card_id}/moves
@desc Move a project card
@required {card_id: int # card_id parameter, position: str # The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card.}
@optional {column_id: int # The unique identifier of the column the card should be moved to}
@returns(201) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 422: Validation failed, 503: Response}

@endpoint GET /projects/columns/{column_id}
@desc Get a project column
@required {column_id: int # column_id parameter}
@returns(200) {url: str(uri), project_url: str(uri), cards_url: str(uri), id: int, node_id: str, name: str, created_at: str(date-time), updated_at: str(date-time)} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint PATCH /projects/columns/{column_id}
@desc Update an existing project column
@required {column_id: int # column_id parameter, name: str # Name of the project column}
@returns(200) {url: str(uri), project_url: str(uri), cards_url: str(uri), id: int, node_id: str, name: str, created_at: str(date-time), updated_at: str(date-time)} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint DELETE /projects/columns/{column_id}
@desc Delete a project column
@required {column_id: int # column_id parameter}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint GET /projects/columns/{column_id}/cards
@desc List project cards
@required {column_id: int # column_id parameter}
@optional {archived_state: str(all/archived/not_archived)=not_archived # Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint POST /projects/columns/{column_id}/cards
@desc Create a project card
@required {column_id: int # column_id parameter}
@returns(201) {url: str(uri), id: int, node_id: str, note: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), archived: bool, column_name: str, project_id: str, column_url: str(uri), content_url: str(uri), project_url: str(uri)} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 422: Validation failed, 503: Response}

@endpoint POST /projects/columns/{column_id}/moves
@desc Move a project column
@required {column_id: int # column_id parameter, position: str # The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column.}
@returns(201) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 422: Validation failed}

@endpoint GET /projects/{project_id}
@desc Get a project
@required {project_id: int}
@returns(200) {owner_url: str(uri), url: str(uri), html_url: str(uri), columns_url: str(uri), id: int, node_id: str, name: str, body: str?, number: int, state: str, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), organization_permission: str, private: bool} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint PATCH /projects/{project_id}
@desc Update a project
@required {project_id: int}
@optional {name: str # Name of the project, body: str # Body of the project, state: str # State of the project; either 'open' or 'closed', organization_permission: str(read/write/admin/none) # The baseline permission that all organization members have on this project, private: bool # Whether or not this project can be seen by everyone.}
@returns(200) {owner_url: str(uri), url: str(uri), html_url: str(uri), columns_url: str(uri), id: int, node_id: str, name: str, body: str?, number: int, state: str, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), organization_permission: str, private: bool} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Not Found if the authenticated user does not have access to the project, 410: Gone, 422: Validation failed}

@endpoint DELETE /projects/{project_id}
@desc Delete a project
@required {project_id: int}
@returns(204) Delete Success
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 410: Gone}

@endpoint GET /projects/{project_id}/collaborators
@desc List project collaborators
@required {project_id: int}
@optional {affiliation: str(outside/direct/all)=all # Filters the collaborators by their affiliation. Can be one of:   \* `outside`: Outside collaborators of a project that are not a member of the project's organization.   \* `direct`: Collaborators with permissions to a project, regardless of organization membership status.   \* `all`: All collaborators the authenticated user can see., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 415: Preview header missing, 422: Validation failed}

@endpoint PUT /projects/{project_id}/collaborators/{username}
@desc Add project collaborator
@required {project_id: int, username: str}
@optional {permission: str(read/write/admin)=write # The permission to grant the collaborator.}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 415: Preview header missing, 422: Validation failed}

@endpoint DELETE /projects/{project_id}/collaborators/{username}
@desc Remove user as a collaborator
@required {project_id: int, username: str}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 415: Preview header missing, 422: Validation failed}

@endpoint GET /projects/{project_id}/collaborators/{username}/permission
@desc Get project permission for a user
@required {project_id: int, username: str}
@returns(200) {permission: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 415: Preview header missing, 422: Validation failed}

@endpoint GET /projects/{project_id}/columns
@desc List project columns
@required {project_id: int}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint POST /projects/{project_id}/columns
@desc Create a project column
@required {project_id: int, name: str # Name of the project column}
@returns(201) {url: str(uri), project_url: str(uri), cards_url: str(uri), id: int, node_id: str, name: str, created_at: str(date-time), updated_at: str(date-time)} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 422: Validation failed}

@endgroup

@group rate_limit
@endpoint GET /rate_limit
@desc Get rate limit status for the authenticated user
@returns(200) {resources: map{core: map{limit: int, remaining: int, reset: int, used: int}, graphql: map{limit: int, remaining: int, reset: int, used: int}, search: map{limit: int, remaining: int, reset: int, used: int}, source_import: map{limit: int, remaining: int, reset: int, used: int}, integration_manifest: map{limit: int, remaining: int, reset: int, used: int}, code_scanning_upload: map{limit: int, remaining: int, reset: int, used: int}}, rate: map{limit: int, remaining: int, reset: int, used: int}} # Response
@errors {304: Not modified, 404: Resource not found}

@endgroup

@group reactions
@endpoint DELETE /reactions/{reaction_id}
@desc Delete a reaction (Legacy)
@required {reaction_id: int}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 410: Gone, 415: Preview header missing}

@endgroup

@group repos
@endpoint GET /repos/{owner}/{repo}
@desc Get a repository
@required {owner: str, repo: str}
@returns(200) {id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time), created_at: str(date-time), updated_at: str(date-time), permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, parent: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, source: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, forks: int, master_branch: str, open_issues: int, watchers: int, anonymous_access_enabled: bool, code_of_conduct: map{url: str(uri), key: str, name: str, html_url: str(uri)?}} # Response
@errors {301: Moved permanently, 403: Forbidden, 404: Resource not found}

@endpoint PATCH /repos/{owner}/{repo}
@desc Update a repository
@required {owner: str, repo: str}
@optional {name: str # The name of the repository., description: str # A short description of the repository., homepage: str # A URL with more information about the repository., private: bool=false # Either `true` to make the repository private or `false` to make it public. Default: `false`.   **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private., visibility: str(public/private/visibility/internal) # Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. The `visibility` parameter overrides the `private` parameter when you use both along with the `nebula-preview` preview header., has_issues: bool=true # Either `true` to enable issues for this repository or `false` to disable them., has_projects: bool=true # Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error., has_wiki: bool=true # Either `true` to enable the wiki for this repository or `false` to disable it., is_template: bool=false # Either `true` to make this repo available as a template repository or `false` to prevent it., default_branch: str # Updates the default branch for this repository., allow_squash_merge: bool=true # Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging., allow_merge_commit: bool=true # Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits., allow_rebase_merge: bool=true # Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging., delete_branch_on_merge: bool=false # Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion., archived: bool=false # `true` to archive this repository. **Note**: You cannot unarchive repositories through the API., allow_forking: bool=false # Either `true` to allow private forks, or `false` to prevent private forks.}
@returns(200) {id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time), created_at: str(date-time), updated_at: str(date-time), permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, parent: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, source: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, forks: int, master_branch: str, open_issues: int, watchers: int, anonymous_access_enabled: bool, code_of_conduct: map{url: str(uri), key: str, name: str, html_url: str(uri)?}} # Response
@errors {307: Temporary Redirect, 403: Forbidden, 404: Resource not found, 422: Validation failed}
@example_request {"name":"Hello-World","description":"This is your first repository","homepage":"https://github.com","private":true,"has_issues":true,"has_projects":true,"has_wiki":true}

@endpoint DELETE /repos/{owner}/{repo}
@desc Delete a repository
@required {owner: str, repo: str}
@returns(204) Response
@errors {307: Temporary Redirect, 403: If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response:, 404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/assignees
@desc List assignees
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/assignees/{assignee}
@desc Check if a user can be assigned
@required {owner: str, repo: str, assignee: str}
@returns(204) If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.
@errors {404: Otherwise a `404` status code is returned.}

@endpoint GET /repos/{owner}/{repo}/branches
@desc List branches
@required {owner: str, repo: str}
@optional {protected: bool # Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/branches/{branch}
@desc Get a branch
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) {name: str, commit: map{url: str(uri), sha: str, node_id: str, html_url: str(uri), comments_url: str(uri), commit: map{url: str(uri), author: map?{name: str, email: str, date: str}, committer: map?{name: str, email: str, date: str}, message: str, comment_count: int, tree: map{sha: str, url: str(uri)}, verification: map{verified: bool, reason: str, payload: str?, signature: str?}}, author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, committer: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, parents: [map], stats: map{additions: int, deletions: int, total: int}, files: [map]}, _links: map{html: str, self: str(uri)}, protected: bool, protection: map{url: str, enabled: bool, required_status_checks: map{url: str, enforcement_level: str, contexts: [str], contexts_url: str, strict: bool}, enforce_admins: map{url: str(uri), enabled: bool}, required_pull_request_reviews: map{url: str(uri), dismissal_restrictions: map{users: [map], teams: [map], url: str, users_url: str, teams_url: str}, dismiss_stale_reviews: bool, require_code_owner_reviews: bool, required_approving_review_count: int}, restrictions: map{url: str(uri), users_url: str(uri), teams_url: str(uri), apps_url: str(uri), users: [map], teams: [map], apps: [map]}, required_linear_history: map{enabled: bool}, allow_force_pushes: map{enabled: bool}, allow_deletions: map{enabled: bool}, required_conversation_resolution: map{enabled: bool}, name: str, protection_url: str, required_signatures: map{url: str(uri), enabled: bool}}, protection_url: str(uri), pattern: str, required_approving_review_count: int} # Response
@errors {301: Moved permanently, 404: Resource not found, 415: Preview header missing}

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection
@desc Get branch protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) {url: str, enabled: bool, required_status_checks: map{url: str, enforcement_level: str, contexts: [str], contexts_url: str, strict: bool}, enforce_admins: map{url: str(uri), enabled: bool}, required_pull_request_reviews: map{url: str(uri), dismissal_restrictions: map{users: [map], teams: [map], url: str, users_url: str, teams_url: str}, dismiss_stale_reviews: bool, require_code_owner_reviews: bool, required_approving_review_count: int}, restrictions: map{url: str(uri), users_url: str(uri), teams_url: str(uri), apps_url: str(uri), users: [map], teams: [map], apps: [map]}, required_linear_history: map{enabled: bool}, allow_force_pushes: map{enabled: bool}, allow_deletions: map{enabled: bool}, required_conversation_resolution: map{enabled: bool}, name: str, protection_url: str, required_signatures: map{url: str(uri), enabled: bool}} # Response
@errors {404: Resource not found}

@endpoint PUT /repos/{owner}/{repo}/branches/{branch}/protection
@desc Update branch protection
@required {owner: str, repo: str, branch: str # The name of the branch., required_status_checks: map{strict!: bool, contexts!: [str]} # Require status checks to pass before merging. Set to `null` to disable., enforce_admins: bool # Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable., required_pull_request_reviews: map{dismissal_restrictions: map, dismiss_stale_reviews: bool, require_code_owner_reviews: bool, required_approving_review_count: int} # Require at least one approving review on a pull request, before merging. Set to `null` to disable., restrictions: map{users!: [str], teams!: [str], apps: [str]} # Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.}
@optional {required_linear_history: bool # Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation., allow_force_pushes: bool # Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation.", allow_deletions: bool # Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation., required_conversation_resolution: bool # Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`.}
@returns(200) {url: str(uri), required_status_checks: map{url: str(uri), strict: bool, contexts: [str], contexts_url: str(uri)}, required_pull_request_reviews: map{url: str(uri), dismiss_stale_reviews: bool, require_code_owner_reviews: bool, required_approving_review_count: int, dismissal_restrictions: map{url: str(uri), users_url: str(uri), teams_url: str(uri), users: [map], teams: [map]}}, required_signatures: map{url: str(uri), enabled: bool}, enforce_admins: map{url: str(uri), enabled: bool}, required_linear_history: map{enabled: bool}, allow_force_pushes: map{enabled: bool}, allow_deletions: map{enabled: bool}, restrictions: map{url: str(uri), users_url: str(uri), teams_url: str(uri), apps_url: str(uri), users: [map], teams: [map], apps: [map]}, required_conversation_resolution: map{enabled: bool}} # Response
@errors {403: Forbidden, 404: Resource not found, 415: Preview header missing, 422: Validation failed}
@example_request {"required_status_checks":{"strict":true,"contexts":["continuous-integration/travis-ci"]},"enforce_admins":true,"required_pull_request_reviews":{"dismissal_restrictions":{"users":["octocat"],"teams":["justice-league"]},"dismiss_stale_reviews":true,"require_code_owner_reviews":true,"required_approving_review_count":2},"restrictions":{"users":["octocat"],"teams":["justice-league"],"apps":["super-ci"]},"required_linear_history":true,"allow_force_pushes":true,"allow_deletions":true,"required_conversation_resolution":true}

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection
@desc Delete branch protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(204) Response
@errors {403: Forbidden}

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
@desc Get admin branch protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) {url: str(uri), enabled: bool} # Response

@endpoint POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
@desc Set admin branch protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) {url: str(uri), enabled: bool} # Response

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
@desc Delete admin branch protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(204) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
@desc Get pull request review protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) {url: str(uri), dismissal_restrictions: map{users: [map], teams: [map], url: str, users_url: str, teams_url: str}, dismiss_stale_reviews: bool, require_code_owner_reviews: bool, required_approving_review_count: int} # Response

@endpoint PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
@desc Update pull request review protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@optional {dismissal_restrictions: map{users: [str], teams: [str]} # Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories., dismiss_stale_reviews: bool # Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit., require_code_owner_reviews: bool # Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed., required_approving_review_count: int # Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.}
@returns(200) {url: str(uri), dismissal_restrictions: map{users: [map], teams: [map], url: str, users_url: str, teams_url: str}, dismiss_stale_reviews: bool, require_code_owner_reviews: bool, required_approving_review_count: int} # Response
@errors {422: Validation failed}
@example_request {"dismissal_restrictions":{"users":["octocat"],"teams":["justice-league"]},"dismiss_stale_reviews":true,"require_code_owner_reviews":true,"required_approving_review_count":2}

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
@desc Delete pull request review protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(204) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
@desc Get commit signature protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) {url: str(uri), enabled: bool} # Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
@desc Create commit signature protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) {url: str(uri), enabled: bool} # Response
@errors {404: Resource not found}

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
@desc Delete commit signature protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(204) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
@desc Get status checks protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) {url: str(uri), strict: bool, contexts: [str], contexts_url: str(uri)} # Response
@errors {404: Resource not found}

@endpoint PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
@desc Update status check protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@optional {strict: bool # Require branches to be up to date before merging., contexts: [str] # The list of status checks to require in order to merge into this branch}
@returns(200) {url: str(uri), strict: bool, contexts: [str], contexts_url: str(uri)} # Response
@errors {404: Resource not found, 422: Validation failed}
@example_request {"strict":true,"contexts":["continuous-integration/travis-ci"]}

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
@desc Remove status check protection
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
@desc Get all status check contexts
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
@desc Add status check contexts
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
@desc Set status check contexts
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
@desc Remove status check contexts
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions
@desc Get access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) {url: str(uri), users_url: str(uri), teams_url: str(uri), apps_url: str(uri), users: [map], teams: [map], apps: [map]} # Response
@errors {404: Resource not found}

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions
@desc Delete access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
@desc Get apps with access to the protected branch
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
@desc Add app access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
@desc Set app access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
@desc Remove app access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
@desc Get teams with access to the protected branch
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
@desc Add team access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
@desc Set team access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
@desc Remove team access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
@desc Get users with access to the protected branch
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
@desc Add user access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
@desc Set user access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
@desc Remove user access restrictions
@required {owner: str, repo: str, branch: str # The name of the branch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint POST /repos/{owner}/{repo}/check-runs
@desc Create a check run
@required {owner: str, repo: str, name: str # The name of the check. For example, "code-coverage"., head_sha: str # The SHA of the commit.}
@optional {details_url: str # The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used., external_id: str # A reference for the run on the integrator's system., status: str(queued/in_progress/completed)=queued # The current status. Can be one of `queued`, `in_progress`, or `completed`., started_at: str(date-time) # The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., conclusion: str(action_required/cancelled/failure/neutral/success/skipped/stale/timed_out) # **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`.   **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this., completed_at: str(date-time) # The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., output: map{title!: str, summary!: str, text: str, annotations: [map], images: [map]} # Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.21/rest/reference/checks#output-object) description., actions: [map{label!: str, description!: str, identifier!: str}] # Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.21/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/enterprise-server@2.21/rest/reference/checks#check-runs-and-requested-actions)." To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/enterprise-server@2.21/rest/reference/checks#check-runs-and-requested-actions)."}
@returns(201) {id: int, head_sha: str, node_id: str, external_id: str?, url: str, html_url: str?, details_url: str?, status: str, conclusion: str?, started_at: str(date-time)?, completed_at: str(date-time)?, output: map{title: str?, summary: str?, text: str?, annotations_count: int, annotations_url: str(uri)}, name: str, check_suite: map?{id: int}, app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, pull_requests: any, deployment: map{url: str(uri), id: int, node_id: str, task: str, original_environment: str, environment: str, description: str?, created_at: str(date-time), updated_at: str(date-time), statuses_url: str(uri), repository_url: str(uri), transient_environment: bool, production_environment: bool, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}}} # Response
@example_request {"name":"mighty_readme","head_sha":"ce587453ced02b1526dfb4cb910479d431683101","status":"in_progress","external_id":"42","started_at":"2018-05-04T01:14:52Z","output":{"title":"Mighty Readme report","summary":"","text":""}}

@endpoint GET /repos/{owner}/{repo}/check-runs/{check_run_id}
@desc Get a check run
@required {owner: str, repo: str, check_run_id: int # check_run_id parameter}
@returns(200) {id: int, head_sha: str, node_id: str, external_id: str?, url: str, html_url: str?, details_url: str?, status: str, conclusion: str?, started_at: str(date-time)?, completed_at: str(date-time)?, output: map{title: str?, summary: str?, text: str?, annotations_count: int, annotations_url: str(uri)}, name: str, check_suite: map?{id: int}, app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, pull_requests: any, deployment: map{url: str(uri), id: int, node_id: str, task: str, original_environment: str, environment: str, description: str?, created_at: str(date-time), updated_at: str(date-time), statuses_url: str(uri), repository_url: str(uri), transient_environment: bool, production_environment: bool, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}}} # Response

@endpoint PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}
@desc Update a check run
@required {owner: str, repo: str, check_run_id: int # check_run_id parameter}
@optional {name: str # The name of the check. For example, "code-coverage"., details_url: str # The URL of the integrator's site that has the full details of the check., external_id: str # A reference for the run on the integrator's system., started_at: str(date-time) # This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., status: str(queued/in_progress/completed) # The current status. Can be one of `queued`, `in_progress`, or `completed`., conclusion: str(action_required/cancelled/failure/neutral/success/skipped/stale/timed_out) # **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`.   **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this., completed_at: str(date-time) # The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., output: map{title: str, summary!: str, text: str, annotations: [map], images: [map]} # Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.21/rest/reference/checks#output-object-1) description., actions: [map{label!: str, description!: str, identifier!: str}] # Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.21/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/enterprise-server@2.21/rest/reference/checks#check-runs-and-requested-actions)."}
@returns(200) {id: int, head_sha: str, node_id: str, external_id: str?, url: str, html_url: str?, details_url: str?, status: str, conclusion: str?, started_at: str(date-time)?, completed_at: str(date-time)?, output: map{title: str?, summary: str?, text: str?, annotations_count: int, annotations_url: str(uri)}, name: str, check_suite: map?{id: int}, app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, pull_requests: any, deployment: map{url: str(uri), id: int, node_id: str, task: str, original_environment: str, environment: str, description: str?, created_at: str(date-time), updated_at: str(date-time), statuses_url: str(uri), repository_url: str(uri), transient_environment: bool, production_environment: bool, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}}} # Response
@example_request {"name":"mighty_readme","started_at":"2018-05-04T01:14:52Z","status":"completed","conclusion":"success","completed_at":"2018-05-04T01:14:52Z","output":{"title":"Mighty Readme report","summary":"There are 0 failures, 2 warnings, and 1 notices.","text":"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.","annotations":[{"path":"README.md","annotation_level":"warning","title":"Spell Checker","message":"Check your spelling for 'banaas'.","raw_details":"Do you mean 'bananas' or 'banana'?","start_line":2,"end_line":2},{"path":"README.md","annotation_level":"warning","title":"Spell Checker","message":"Check your spelling for 'aples'","raw_details":"Do you mean 'apples' or 'Naples'","start_line":4,"end_line":4}],"images":[{"alt":"Super bananas","image_url":"http://example.com/images/42"}]}}

@endpoint GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations
@desc List check run annotations
@required {owner: str, repo: str, check_run_id: int # check_run_id parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /repos/{owner}/{repo}/check-suites
@desc Create a check suite
@required {owner: str, repo: str, head_sha: str # The sha of the head commit.}
@returns(200) {id: int, node_id: str, head_branch: str?, head_sha: str, status: str?, conclusion: str?, url: str?, before: str?, after: str?, pull_requests: [map]?, app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, repository: map{id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str?, hooks_url: str(uri), svn_url: str, homepage: str?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, delete_branch_on_merge: bool, subscribers_count: int, network_count: int, code_of_conduct: map{key: str, name: str, url: str(uri), body: str, html_url: str(uri)?}, license: map?{key: str, name: str, spdx_id: str, url: str, node_id: str}, forks: int, open_issues: int, watchers: int, allow_forking: bool, anonymous_access_enabled: bool}, created_at: str(date-time)?, updated_at: str(date-time)?, head_commit: map{id: str, tree_id: str, message: str, timestamp: str(date-time), author: map?{name: str, email: str}, committer: map?{name: str, email: str}}, latest_check_runs_count: int, check_runs_url: str} # when the suite already existed
@returns(201) {id: int, node_id: str, head_branch: str?, head_sha: str, status: str?, conclusion: str?, url: str?, before: str?, after: str?, pull_requests: [map]?, app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, repository: map{id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str?, hooks_url: str(uri), svn_url: str, homepage: str?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, delete_branch_on_merge: bool, subscribers_count: int, network_count: int, code_of_conduct: map{key: str, name: str, url: str(uri), body: str, html_url: str(uri)?}, license: map?{key: str, name: str, spdx_id: str, url: str, node_id: str}, forks: int, open_issues: int, watchers: int, allow_forking: bool, anonymous_access_enabled: bool}, created_at: str(date-time)?, updated_at: str(date-time)?, head_commit: map{id: str, tree_id: str, message: str, timestamp: str(date-time), author: map?{name: str, email: str}, committer: map?{name: str, email: str}}, latest_check_runs_count: int, check_runs_url: str} # Response when the suite was created
@example_request {"head_sha":"d6fde92930d4715a2b49857d24b940956b26d2d3"}

@endpoint PATCH /repos/{owner}/{repo}/check-suites/preferences
@desc Update repository preferences for check suites
@required {owner: str, repo: str}
@optional {auto_trigger_checks: [map{app_id!: int, setting!: bool}] # Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/enterprise-server@2.21/rest/reference/checks#auto_trigger_checks-object) description for details.}
@returns(200) {preferences: map{auto_trigger_checks: [map]}, repository: map{id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str?, hooks_url: str(uri), svn_url: str, homepage: str?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, delete_branch_on_merge: bool, subscribers_count: int, network_count: int, code_of_conduct: map{key: str, name: str, url: str(uri), body: str, html_url: str(uri)?}, license: map?{key: str, name: str, spdx_id: str, url: str, node_id: str}, forks: int, open_issues: int, watchers: int, allow_forking: bool, anonymous_access_enabled: bool}} # Response
@example_request {"auto_trigger_checks":[{"app_id":4,"setting":false}]}

@endpoint GET /repos/{owner}/{repo}/check-suites/{check_suite_id}
@desc Get a check suite
@required {owner: str, repo: str, check_suite_id: int # check_suite_id parameter}
@returns(200) {id: int, node_id: str, head_branch: str?, head_sha: str, status: str?, conclusion: str?, url: str?, before: str?, after: str?, pull_requests: [map]?, app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, repository: map{id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str?, hooks_url: str(uri), svn_url: str, homepage: str?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, delete_branch_on_merge: bool, subscribers_count: int, network_count: int, code_of_conduct: map{key: str, name: str, url: str(uri), body: str, html_url: str(uri)?}, license: map?{key: str, name: str, spdx_id: str, url: str, node_id: str}, forks: int, open_issues: int, watchers: int, allow_forking: bool, anonymous_access_enabled: bool}, created_at: str(date-time)?, updated_at: str(date-time)?, head_commit: map{id: str, tree_id: str, message: str, timestamp: str(date-time), author: map?{name: str, email: str}, committer: map?{name: str, email: str}}, latest_check_runs_count: int, check_runs_url: str} # Response

@endpoint GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs
@desc List check runs in a check suite
@required {owner: str, repo: str, check_suite_id: int # check_suite_id parameter}
@optional {check_name: str # Returns check runs with the specified `name`., status: str(queued/in_progress/completed) # Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`., filter: str(latest/all)=latest # Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, check_runs: [map]} # Response

@endpoint POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest
@desc Rerequest a check suite
@required {owner: str, repo: str, check_suite_id: int # check_suite_id parameter}
@returns(201) Response

@endpoint GET /repos/{owner}/{repo}/collaborators
@desc List repository collaborators
@required {owner: str, repo: str}
@optional {affiliation: str(outside/direct/all)=all # Filter collaborators returned by their affiliation. Can be one of:   \* `outside`: All outside collaborators of an organization-owned repository.   \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status.   \* `all`: All collaborators the authenticated user can see., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/collaborators/{username}
@desc Check if a user is a repository collaborator
@required {owner: str, repo: str, username: str}
@returns(204) Response if user is a collaborator
@errors {404: Not Found if user is not a collaborator}

@endpoint PUT /repos/{owner}/{repo}/collaborators/{username}
@desc Add a repository collaborator
@required {owner: str, repo: str, username: str}
@optional {permission: str(pull/push/admin/maintain/triage)=push # The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of:   \* `pull` - can pull, but not push to or administer this repository.   \* `push` - can pull and push, but not administer this repository.   \* `admin` - can pull, push and administer this repository.   \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.   \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.  \* custom repository role name - Can assign a custom repository role if the owning organization has defined any., permissions: str}
@returns(201) {id: int, repository: map{id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str?, hooks_url: str(uri), svn_url: str, homepage: str?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, delete_branch_on_merge: bool, subscribers_count: int, network_count: int, code_of_conduct: map{key: str, name: str, url: str(uri), body: str, html_url: str(uri)?}, license: map?{key: str, name: str, spdx_id: str, url: str, node_id: str}, forks: int, open_issues: int, watchers: int, allow_forking: bool, anonymous_access_enabled: bool}, invitee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, inviter: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, permissions: str, created_at: str(date-time), expired: bool, url: str, html_url: str, node_id: str} # Response when a new invitation is created
@returns(204) Response when person is already a collaborator
@errors {403: Forbidden, 422: Validation failed}

@endpoint DELETE /repos/{owner}/{repo}/collaborators/{username}
@desc Remove a repository collaborator
@required {owner: str, repo: str, username: str}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/collaborators/{username}/permission
@desc Get repository permissions for a user
@required {owner: str, repo: str, username: str}
@returns(200) {permission: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}} # if user has admin permissions
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/comments
@desc List commit comments for a repository
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/comments/{comment_id}
@desc Get a commit comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter}
@returns(200) {html_url: str(uri), url: str(uri), id: int, node_id: str, body: str, path: str?, position: int?, line: int?, commit_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), author_association: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {404: Resource not found}

@endpoint PATCH /repos/{owner}/{repo}/comments/{comment_id}
@desc Update a commit comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter, body: str # The contents of the comment}
@returns(200) {html_url: str(uri), url: str(uri), id: int, node_id: str, body: str, path: str?, position: int?, line: int?, commit_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), author_association: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {404: Resource not found}
@example_request {"body":"Nice change"}

@endpoint DELETE /repos/{owner}/{repo}/comments/{comment_id}
@desc Delete a commit comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter}
@returns(204) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/comments/{comment_id}/reactions
@desc List reactions for a commit comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter}
@optional {content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # Returns a single [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found, 415: Preview header missing}

@endpoint POST /repos/{owner}/{repo}/comments/{comment_id}/reactions
@desc Create reaction for a commit comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter, content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # The [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types) to add to the commit comment.}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Reaction exists
@returns(201) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Reaction created
@errors {415: Preview header missing, 422: Validation failed}
@example_request {"content":"heart"}

@endpoint DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}
@desc Delete a commit comment reaction
@required {owner: str, repo: str, comment_id: int # comment_id parameter, reaction_id: int}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/commits
@desc List commits
@required {owner: str, repo: str}
@optional {sha: str # SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`)., path: str # Only commits containing this file path will be returned., author: str # GitHub login or email address by which to filter by commit author., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., until: str(date-time) # Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {400: Bad Request, 404: Resource not found, 409: Conflict, 500: Internal Error}

@endpoint GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head
@desc List branches for HEAD commit
@required {owner: str, repo: str, commit_sha: str # commit_sha parameter}
@returns(200) Response
@errors {415: Preview header missing, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/commits/{commit_sha}/comments
@desc List commit comments
@required {owner: str, repo: str, commit_sha: str # commit_sha parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /repos/{owner}/{repo}/commits/{commit_sha}/comments
@desc Create a commit comment
@required {owner: str, repo: str, commit_sha: str # commit_sha parameter, body: str # The contents of the comment.}
@optional {path: str # Relative path of the file to comment on., position: int # Line index in the diff to comment on., line: int # **Deprecated**. Use **position** parameter instead. Line number in the file to comment on.}
@returns(201) {html_url: str(uri), url: str(uri), id: int, node_id: str, body: str, path: str?, position: int?, line: int?, commit_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), author_association: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {403: Forbidden, 422: Validation failed}
@example_request {"body":"Great stuff","path":"file1.txt","position":4,"line":1}

@endpoint GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls
@desc List pull requests associated with a commit
@required {owner: str, repo: str, commit_sha: str # commit_sha parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {415: Preview header missing}

@endpoint GET /repos/{owner}/{repo}/commits/{ref}
@desc Get a commit
@required {owner: str, repo: str, ref: str # ref parameter}
@optional {page: int=1 # Page number of the results to fetch., per_page: int=30 # Results per page (max 100)}
@returns(200) {url: str(uri), sha: str, node_id: str, html_url: str(uri), comments_url: str(uri), commit: map{url: str(uri), author: map?{name: str, email: str, date: str}, committer: map?{name: str, email: str, date: str}, message: str, comment_count: int, tree: map{sha: str, url: str(uri)}, verification: map{verified: bool, reason: str, payload: str?, signature: str?}}, author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, committer: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, parents: [map], stats: map{additions: int, deletions: int, total: int}, files: [map]} # Response
@errors {404: Resource not found, 422: Validation failed, 500: Internal Error}

@endpoint GET /repos/{owner}/{repo}/commits/{ref}/check-runs
@desc List check runs for a Git reference
@required {owner: str, repo: str, ref: str # ref parameter}
@optional {check_name: str # Returns check runs with the specified `name`., status: str(queued/in_progress/completed) # Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`., filter: str(latest/all)=latest # Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., app_id: int}
@returns(200) {total_count: int, check_runs: [map]} # Response

@endpoint GET /repos/{owner}/{repo}/commits/{ref}/check-suites
@desc List check suites for a Git reference
@required {owner: str, repo: str, ref: str # ref parameter}
@optional {app_id: int # Filters check suites by GitHub App `id`., check_name: str # Returns check runs with the specified `name`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, check_suites: [map]} # Response

@endpoint GET /repos/{owner}/{repo}/commits/{ref}/status
@desc Get the combined status for a specific reference
@required {owner: str, repo: str, ref: str # ref parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {state: str, statuses: [map], sha: str, total_count: int, repository: map{id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str?, hooks_url: str(uri), svn_url: str, homepage: str?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, delete_branch_on_merge: bool, subscribers_count: int, network_count: int, code_of_conduct: map{key: str, name: str, url: str(uri), body: str, html_url: str(uri)?}, license: map?{key: str, name: str, spdx_id: str, url: str, node_id: str}, forks: int, open_issues: int, watchers: int, allow_forking: bool, anonymous_access_enabled: bool}, commit_url: str(uri), url: str(uri)} # Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/commits/{ref}/statuses
@desc List commit statuses for a reference
@required {owner: str, repo: str, ref: str # ref parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {301: Moved permanently}

@endpoint GET /repos/{owner}/{repo}/compare/{basehead}
@desc Compare two commits
@required {owner: str, repo: str, basehead: str # The base branch and head branch to compare. This parameter expects the format `{base}...{head}`.}
@returns(200) {url: str(uri), html_url: str(uri), permalink_url: str(uri), diff_url: str(uri), patch_url: str(uri), base_commit: map{url: str(uri), sha: str, node_id: str, html_url: str(uri), comments_url: str(uri), commit: map{url: str(uri), author: map?{name: str, email: str, date: str}, committer: map?{name: str, email: str, date: str}, message: str, comment_count: int, tree: map{sha: str, url: str(uri)}, verification: map{verified: bool, reason: str, payload: str?, signature: str?}}, author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, committer: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, parents: [map], stats: map{additions: int, deletions: int, total: int}, files: [map]}, merge_base_commit: map{url: str(uri), sha: str, node_id: str, html_url: str(uri), comments_url: str(uri), commit: map{url: str(uri), author: map?{name: str, email: str, date: str}, committer: map?{name: str, email: str, date: str}, message: str, comment_count: int, tree: map{sha: str, url: str(uri)}, verification: map{verified: bool, reason: str, payload: str?, signature: str?}}, author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, committer: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, parents: [map], stats: map{additions: int, deletions: int, total: int}, files: [map]}, status: str, ahead_by: int, behind_by: int, total_commits: int, commits: [map], files: [map]} # Response
@errors {404: Resource not found, 500: Internal Error}

@endpoint POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments
@desc Create a content attachment
@required {owner: str # The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event., repo: str # The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event., content_reference_id: int # The `id` of the `content_reference` event., title: str # The title of the attachment, body: str # The body of the attachment}
@returns(200) {id: int, title: str, body: str, node_id: str} # Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found, 410: Gone, 415: Preview header missing, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/contents/{path}
@desc Get repository content
@required {owner: str, repo: str, path: str # path parameter}
@optional {ref: str # The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)}
@returns(200) Response
@errors {302: Found, 403: Forbidden, 404: Resource not found}

@endpoint PUT /repos/{owner}/{repo}/contents/{path}
@desc Create or update file contents
@required {owner: str, repo: str, path: str # path parameter, message: str # The commit message., content: str # The new file content, using Base64 encoding.}
@optional {sha: str # **Required if you are updating a file**. The blob SHA of the file being replaced., branch: str # The branch name. Default: the repository’s default branch (usually `master`), committer: map{name!: str, email!: str, date: str} # The person that committed the file. Default: the authenticated user., author: map{name!: str, email!: str, date: str} # The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.}
@returns(200) {content: map?{name: str, path: str, sha: str, size: int, url: str, html_url: str, git_url: str, download_url: str, type: str, _links: map{self: str, git: str, html: str}}, commit: map{sha: str, node_id: str, url: str, html_url: str, author: map{date: str, name: str, email: str}, committer: map{date: str, name: str, email: str}, message: str, tree: map{url: str, sha: str}, parents: [map], verification: map{verified: bool, reason: str, signature: str?, payload: str?}}} # Response
@returns(201) {content: map?{name: str, path: str, sha: str, size: int, url: str, html_url: str, git_url: str, download_url: str, type: str, _links: map{self: str, git: str, html: str}}, commit: map{sha: str, node_id: str, url: str, html_url: str, author: map{date: str, name: str, email: str}, committer: map{date: str, name: str, email: str}, message: str, tree: map{url: str, sha: str}, parents: [map], verification: map{verified: bool, reason: str, signature: str?, payload: str?}}} # Response
@errors {404: Resource not found, 409: Conflict, 422: Validation failed}
@example_request {"message":"my commit message","committer":{"name":"Monalisa Octocat","email":"octocat@github.com"},"content":"bXkgbmV3IGZpbGUgY29udGVudHM="}

@endpoint DELETE /repos/{owner}/{repo}/contents/{path}
@desc Delete a file
@required {owner: str, repo: str, path: str # path parameter, message: str # The commit message., sha: str # The blob SHA of the file being replaced.}
@optional {branch: str # The branch name. Default: the repository’s default branch (usually `master`), committer: map{name: str, email: str} # object containing information about the committer., author: map{name: str, email: str} # object containing information about the author.}
@returns(200) {content: map?{name: str, path: str, sha: str, size: int, url: str, html_url: str, git_url: str, download_url: str, type: str, _links: map{self: str, git: str, html: str}}, commit: map{sha: str, node_id: str, url: str, html_url: str, author: map{date: str, name: str, email: str}, committer: map{date: str, name: str, email: str}, message: str, tree: map{url: str, sha: str}, parents: [map], verification: map{verified: bool, reason: str, signature: str?, payload: str?}}} # Response
@errors {404: Resource not found, 409: Conflict, 422: Validation failed, 503: Service unavailable}
@example_request {"message":"my commit message","committer":{"name":"Monalisa Octocat","email":"octocat@github.com"},"sha":"329688480d39049927147c162b9d2deaf885005f"}

@endpoint GET /repos/{owner}/{repo}/contributors
@desc List repository contributors
@required {owner: str, repo: str}
@optional {anon: str # Set to `1` or `true` to include anonymous contributors in results., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) if repository contains content
@returns(204) Response if repository is empty
@errors {403: Forbidden, 404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/deployments
@desc List deployments
@required {owner: str, repo: str}
@optional {sha: str=none # The SHA recorded at creation time., ref: str=none # The name of the ref. This can be a branch, tag, or SHA., task: str=none # The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`)., environment: str=none # The name of the environment that was deployed to (e.g., `staging` or `production`)., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /repos/{owner}/{repo}/deployments
@desc Create a deployment
@required {owner: str, repo: str, ref: str # The ref to deploy. This can be a branch, tag, or SHA.}
@optional {task: str=deploy # Specifies a task to execute (e.g., `deploy` or `deploy:migrations`)., auto_merge: bool=true # Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch., required_contexts: [str] # The [status](https://docs.github.com/enterprise-server@2.21/rest/reference/repos#statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts., payload: any, environment: str=production # Name for the target deployment environment (e.g., `production`, `staging`, `qa`)., description: str= # Short description of the deployment., transient_environment: bool=false # Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false`   **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/enterprise-server@2.21/rest/overview/api-previews#enhanced-deployments) custom media type., production_environment: bool # Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise.   **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/enterprise-server@2.21/rest/overview/api-previews#enhanced-deployments) custom media type.}
@returns(201) {url: str(uri), id: int, node_id: str, sha: str, ref: str, task: str, payload: any, original_environment: str, environment: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), statuses_url: str(uri), repository_url: str(uri), transient_environment: bool, production_environment: bool, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}} # Response
@returns(202) {message: str} # Merged branch response
@errors {409: Conflict when there is a merge conflict or the commit's status checks failed, 422: Validation failed}
@example_request {"ref":"topic-branch","payload":"{ \"deploy\": \"migrate\" }","description":"Deploy request from hubot"}

@endpoint GET /repos/{owner}/{repo}/deployments/{deployment_id}
@desc Get a deployment
@required {owner: str, repo: str, deployment_id: int # deployment_id parameter}
@returns(200) {url: str(uri), id: int, node_id: str, sha: str, ref: str, task: str, payload: any, original_environment: str, environment: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), statuses_url: str(uri), repository_url: str(uri), transient_environment: bool, production_environment: bool, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}} # Response
@errors {404: Resource not found}

@endpoint DELETE /repos/{owner}/{repo}/deployments/{deployment_id}
@desc Delete a deployment
@required {owner: str, repo: str, deployment_id: int # deployment_id parameter}
@returns(204) Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
@desc List deployment statuses
@required {owner: str, repo: str, deployment_id: int # deployment_id parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
@desc Create a deployment status
@required {owner: str, repo: str, deployment_id: int # deployment_id parameter, state: str(error/failure/inactive/in_progress/queued/pending/success) # The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/enterprise-server@2.21/rest/overview/api-previews#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://docs.github.com/enterprise-server@2.21/rest/overview/api-previews#deployment-statuses) custom media type. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub.}
@optional {target_url: str= # The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`., log_url: str= # The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""`   **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/enterprise-server@2.21/rest/overview/api-previews#enhanced-deployments) custom media type., description: str= # A short description of the status. The maximum description length is 140 characters., environment: str(production/staging/qa) # Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://docs.github.com/enterprise-server@2.21/rest/overview/api-previews#deployment-statuses) custom media type., environment_url: str= # Sets the URL for accessing your environment. Default: `""`   **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/enterprise-server@2.21/rest/overview/api-previews#enhanced-deployments) custom media type., auto_inactive: bool # Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true`   **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://docs.github.com/enterprise-server@2.21/rest/overview/api-previews#deployment-statuses) custom media type.   **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/enterprise-server@2.21/rest/overview/api-previews#enhanced-deployments) custom media type.}
@returns(201) {url: str(uri), id: int, node_id: str, state: str, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, description: str, environment: str, target_url: str(uri), created_at: str(date-time), updated_at: str(date-time), deployment_url: str(uri), repository_url: str(uri), environment_url: str(uri), log_url: str(uri), performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}} # Response
@errors {422: Validation failed}
@example_request {"environment":"production","state":"success","log_url":"https://example.com/deployment/42/output","description":"Deployment finished successfully."}

@endpoint GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}
@desc Get a deployment status
@required {owner: str, repo: str, deployment_id: int # deployment_id parameter, status_id: int}
@returns(200) {url: str(uri), id: int, node_id: str, state: str, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, description: str, environment: str, target_url: str(uri), created_at: str(date-time), updated_at: str(date-time), deployment_url: str(uri), repository_url: str(uri), environment_url: str(uri), log_url: str(uri), performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}} # Response
@errors {404: Resource not found, 415: Preview header missing}

@endpoint POST /repos/{owner}/{repo}/dispatches
@desc Create a repository dispatch event
@required {owner: str, repo: str, event_type: str # A custom webhook event name.}
@optional {client_payload: map # JSON payload with extra information about the webhook event that your action or worklow may use.}
@returns(204) Response
@errors {422: Validation failed}
@example_request {"event_type":"on-demand-test","client_payload":{"unit":false,"integration":true}}

@endpoint GET /repos/{owner}/{repo}/events
@desc List repository events
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/forks
@desc List forks
@required {owner: str, repo: str}
@optional {sort: str(newest/oldest/stargazers/watchers)=newest # The sort order. Can be either `newest`, `oldest`, or `stargazers`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {400: Bad Request}

@endpoint POST /repos/{owner}/{repo}/forks
@desc Create a fork
@required {owner: str, repo: str}
@optional {organization: str # Optional parameter to specify the organization name if forking into an organization.}
@returns(202) {id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time), created_at: str(date-time), updated_at: str(date-time), permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, parent: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, source: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, forks: int, master_branch: str, open_issues: int, watchers: int, anonymous_access_enabled: bool, code_of_conduct: map{url: str(uri), key: str, name: str, html_url: str(uri)?}} # Response
@errors {400: Bad Request, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint POST /repos/{owner}/{repo}/git/blobs
@desc Create a blob
@required {owner: str, repo: str, content: str # The new blob's content.}
@optional {encoding: str=utf-8 # The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported.}
@returns(201) {url: str, sha: str} # Response
@errors {403: Forbidden, 404: Resource not found, 409: Conflict, 422: Validation failed}
@example_request {"content":"Content of the blob","encoding":"utf-8"}

@endpoint GET /repos/{owner}/{repo}/git/blobs/{file_sha}
@desc Get a blob
@required {owner: str, repo: str, file_sha: str}
@returns(200) {content: str, encoding: str, url: str(uri), sha: str, size: int?, node_id: str, highlighted_content: str} # Response
@errors {403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint POST /repos/{owner}/{repo}/git/commits
@desc Create a commit
@required {owner: str, repo: str, message: str # The commit message, tree: str # The SHA of the tree object this commit points to}
@optional {parents: [str] # The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided., author: map{name!: str, email!: str, date: str(date-time)} # Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details., committer: map{name: str, email: str, date: str(date-time)} # Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details., signature: str # The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits.}
@returns(201) {sha: str, node_id: str, url: str(uri), author: map{date: str(date-time), email: str, name: str}, committer: map{date: str(date-time), email: str, name: str}, message: str, tree: map{sha: str, url: str(uri)}, parents: [map], verification: map{verified: bool, reason: str, signature: str?, payload: str?}, html_url: str(uri)} # Response
@errors {404: Resource not found, 422: Validation failed}
@example_request {"message":"my commit message","author":{"name":"Mona Octocat","email":"octocat@github.com","date":"2008-07-09T16:13:30+12:00"},"parents":["7d1b31e74ee336d15cbd21741bc88a537ed063a0"],"tree":"827efc6d56897b048c772eb4087f854f46256132","signature":"-----BEGIN PGP SIGNATURE-----\n\niQIzBAABAQAdFiEESn/54jMNIrGSE6Tp6cQjvhfv7nAFAlnT71cACgkQ6cQjvhfv\n7nCWwA//XVqBKWO0zF+bZl6pggvky3Oc2j1pNFuRWZ29LXpNuD5WUGXGG209B0hI\nDkmcGk19ZKUTnEUJV2Xd0R7AW01S/YSub7OYcgBkI7qUE13FVHN5ln1KvH2all2n\n2+JCV1HcJLEoTjqIFZSSu/sMdhkLQ9/NsmMAzpf/iIM0nQOyU4YRex9eD1bYj6nA\nOQPIDdAuaTQj1gFPHYLzM4zJnCqGdRlg0sOM/zC5apBNzIwlgREatOYQSCfCKV7k\nnrU34X8b9BzQaUx48Qa+Dmfn5KQ8dl27RNeWAqlkuWyv3pUauH9UeYW+KyuJeMkU\n+NyHgAsWFaCFl23kCHThbLStMZOYEnGagrd0hnm1TPS4GJkV4wfYMwnI4KuSlHKB\njHl3Js9vNzEUQipQJbgCgTiWvRJoK3ENwBTMVkKHaqT4x9U4Jk/XZB6Q8MA09ezJ\n3QgiTjTAGcum9E9QiJqMYdWQPWkaBIRRz5cET6HPB48YNXAAUsfmuYsGrnVLYbG+\nUpC6I97VybYHTy2O9XSGoaLeMI9CsFn38ycAxxbWagk5mhclNTP5mezIq6wKSwmr\nX11FW3n1J23fWZn5HJMBsRnUCgzqzX3871IqLYHqRJ/bpZ4h20RhTyPj5c/z7QXp\neSakNQMfbbMcljkha+ZMuVQX1K9aRlVqbmv3ZMWh+OijLYVU2bc=\n=5Io4\n-----END PGP SIGNATURE-----\n"}

@endpoint GET /repos/{owner}/{repo}/git/commits/{commit_sha}
@desc Get a commit
@required {owner: str, repo: str, commit_sha: str # commit_sha parameter}
@returns(200) {sha: str, node_id: str, url: str(uri), author: map{date: str(date-time), email: str, name: str}, committer: map{date: str(date-time), email: str, name: str}, message: str, tree: map{sha: str, url: str(uri)}, parents: [map], verification: map{verified: bool, reason: str, signature: str?, payload: str?}, html_url: str(uri)} # Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/git/matching-refs/{ref}
@desc List matching references
@required {owner: str, repo: str, ref: str # ref parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/git/ref/{ref}
@desc Get a reference
@required {owner: str, repo: str, ref: str # ref parameter}
@returns(200) {ref: str, node_id: str, url: str(uri), object: map{type: str, sha: str, url: str(uri)}} # Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/git/refs
@desc Create a reference
@required {owner: str, repo: str, ref: str # The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected., sha: str # The SHA1 value for this reference.}
@optional {key: str}
@returns(201) {ref: str, node_id: str, url: str(uri), object: map{type: str, sha: str, url: str(uri)}} # Response
@errors {422: Validation failed}
@example_request {"ref":"refs/heads/featureA","sha":"aa218f56b14c9653891f9e74264a383fa43fefbd"}

@endpoint PATCH /repos/{owner}/{repo}/git/refs/{ref}
@desc Update a reference
@required {owner: str, repo: str, ref: str # ref parameter, sha: str # The SHA1 value to set this reference to}
@optional {force: bool=false # Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work.}
@returns(200) {ref: str, node_id: str, url: str(uri), object: map{type: str, sha: str, url: str(uri)}} # Response
@errors {422: Validation failed}
@example_request {"sha":"aa218f56b14c9653891f9e74264a383fa43fefbd","force":true}

@endpoint DELETE /repos/{owner}/{repo}/git/refs/{ref}
@desc Delete a reference
@required {owner: str, repo: str, ref: str # ref parameter}
@returns(204) Response
@errors {422: Validation failed}

@endpoint POST /repos/{owner}/{repo}/git/tags
@desc Create a tag object
@required {owner: str, repo: str, tag: str # The tag's name. This is typically a version (e.g., "v0.0.1")., message: str # The tag message., object: str # The SHA of the git object this is tagging., type: str(commit/tree/blob) # The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`.}
@optional {tagger: map{name!: str, email!: str, date: str(date-time)} # An object with information about the individual creating the tag.}
@returns(201) {node_id: str, tag: str, sha: str, url: str(uri), message: str, tagger: map{date: str, email: str, name: str}, object: map{sha: str, type: str, url: str(uri)}, verification: map{verified: bool, reason: str, payload: str?, signature: str?}} # Response
@errors {422: Validation failed}
@example_request {"tag":"v0.0.1","message":"initial version","object":"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c","type":"commit","tagger":{"name":"Monalisa Octocat","email":"octocat@github.com","date":"2011-06-17T14:53:35-07:00"}}

@endpoint GET /repos/{owner}/{repo}/git/tags/{tag_sha}
@desc Get a tag
@required {owner: str, repo: str, tag_sha: str}
@returns(200) {node_id: str, tag: str, sha: str, url: str(uri), message: str, tagger: map{date: str, email: str, name: str}, object: map{sha: str, type: str, url: str(uri)}, verification: map{verified: bool, reason: str, payload: str?, signature: str?}} # Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/git/trees
@desc Create a tree
@required {owner: str, repo: str, tree: [map{path: str, mode: str, type: str, sha: str, content: str}] # Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure.}
@optional {base_tree: str # The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit.}
@returns(201) {sha: str, url: str(uri), truncated: bool, tree: [map]} # Response
@errors {403: Forbidden, 404: Resource not found, 422: Validation failed}
@example_request {"base_tree":"9fb037999f264ba9a7fc6274d15fa3ae2ab98312","tree":[{"path":"file.rb","mode":"100644","type":"blob","sha":"44b4fc6d56897b048c772eb4087f854f46256132"}]}

@endpoint GET /repos/{owner}/{repo}/git/trees/{tree_sha}
@desc Get a tree
@required {owner: str, repo: str, tree_sha: str}
@optional {recursive: str # Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees.}
@returns(200) {sha: str, url: str(uri), truncated: bool, tree: [map]} # Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/hooks
@desc List repository webhooks
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/hooks
@desc Create a repository webhook
@required {owner: str, repo: str}
@optional {name: str # Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`., config: map{url: str(uri), content_type: str, secret: str, insecure_ssl: any, token: str, digest: str} # Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.21/rest/reference/repos#create-hook-config-params)., events: [str]=push # Determines what [events](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads) the hook is triggered for., active: bool=true # Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.}
@returns(201) {type: str, id: int, name: str, active: bool, events: [str], config: map{email: str, password: str, room: str, subdomain: str, url: str(uri), insecure_ssl: any, content_type: str, digest: str, secret: str, token: str}, updated_at: str(date-time), created_at: str(date-time), url: str(uri), test_url: str(uri), ping_url: str(uri), last_response: map{code: int?, status: str?, message: str?}} # Response
@errors {403: Forbidden, 404: Resource not found, 422: Validation failed}
@example_request {"name":"web","active":true,"events":["push","pull_request"],"config":{"url":"https://example.com/webhook","content_type":"json","insecure_ssl":"0"}}

@endpoint GET /repos/{owner}/{repo}/hooks/{hook_id}
@desc Get a repository webhook
@required {owner: str, repo: str, hook_id: int}
@returns(200) {type: str, id: int, name: str, active: bool, events: [str], config: map{email: str, password: str, room: str, subdomain: str, url: str(uri), insecure_ssl: any, content_type: str, digest: str, secret: str, token: str}, updated_at: str(date-time), created_at: str(date-time), url: str(uri), test_url: str(uri), ping_url: str(uri), last_response: map{code: int?, status: str?, message: str?}} # Response
@errors {404: Resource not found}

@endpoint PATCH /repos/{owner}/{repo}/hooks/{hook_id}
@desc Update a repository webhook
@required {owner: str, repo: str, hook_id: int}
@optional {config: map{url!: str(uri), content_type: str, secret: str, insecure_ssl: any, address: str, room: str} # Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.21/rest/reference/repos#create-hook-config-params)., events: [str]=push # Determines what [events](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events., add_events: [str] # Determines a list of events to be added to the list of events that the Hook triggers for., remove_events: [str] # Determines a list of events to be removed from the list of events that the Hook triggers for., active: bool=true # Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.}
@returns(200) {type: str, id: int, name: str, active: bool, events: [str], config: map{email: str, password: str, room: str, subdomain: str, url: str(uri), insecure_ssl: any, content_type: str, digest: str, secret: str, token: str}, updated_at: str(date-time), created_at: str(date-time), url: str(uri), test_url: str(uri), ping_url: str(uri), last_response: map{code: int?, status: str?, message: str?}} # Response
@errors {404: Resource not found, 422: Validation failed}
@example_request {"active":true,"add_events":["pull_request"]}

@endpoint DELETE /repos/{owner}/{repo}/hooks/{hook_id}
@desc Delete a repository webhook
@required {owner: str, repo: str, hook_id: int}
@returns(204) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/hooks/{hook_id}/pings
@desc Ping a repository webhook
@required {owner: str, repo: str, hook_id: int}
@returns(204) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/hooks/{hook_id}/tests
@desc Test the push repository webhook
@required {owner: str, repo: str, hook_id: int}
@returns(204) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/installation
@desc Get a repository installation for the authenticated app
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change., owner: str, repo: str}
@returns(200) {id: int, account: any?, repository_selection: str, access_tokens_url: str(uri), repositories_url: str(uri), html_url: str(uri), app_id: int, target_id: int, target_type: str, permissions: map{deployments: str, checks: str, metadata: str, contents: str, pull_requests: str, statuses: str, issues: str, organization_administration: str}, events: [str], created_at: str(date-time), updated_at: str(date-time), single_file_name: str?, app_slug: str, suspended_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, suspended_at: str(date-time)?, contact_email: str?} # Response
@errors {301: Moved permanently, 404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/invitations
@desc List repository invitations
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint PATCH /repos/{owner}/{repo}/invitations/{invitation_id}
@desc Update a repository invitation
@required {owner: str, repo: str, invitation_id: int # invitation_id parameter}
@optional {permissions: str(read/write/maintain/triage/admin) # The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`.}
@returns(200) {id: int, repository: map{id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str?, hooks_url: str(uri), svn_url: str, homepage: str?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, delete_branch_on_merge: bool, subscribers_count: int, network_count: int, code_of_conduct: map{key: str, name: str, url: str(uri), body: str, html_url: str(uri)?}, license: map?{key: str, name: str, spdx_id: str, url: str, node_id: str}, forks: int, open_issues: int, watchers: int, allow_forking: bool, anonymous_access_enabled: bool}, invitee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, inviter: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, permissions: str, created_at: str(date-time), expired: bool, url: str, html_url: str, node_id: str} # Response

@endpoint DELETE /repos/{owner}/{repo}/invitations/{invitation_id}
@desc Delete a repository invitation
@required {owner: str, repo: str, invitation_id: int # invitation_id parameter}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/issues
@desc List repository issues
@required {owner: str, repo: str}
@optional {milestone: str # If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned., state: str(open/closed/all)=open # Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`., assignee: str # Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user., creator: str # The user that created the issue., mentioned: str # A user that's mentioned in the issue., labels: str # A list of comma separated label names. Example: `bug,ui,@high`, sort: str(created/updated/comments)=created # What to sort results by. Can be either `created`, `updated`, `comments`., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {301: Moved permanently, 404: Resource not found, 422: Validation failed}

@endpoint POST /repos/{owner}/{repo}/issues
@desc Create an issue
@required {owner: str, repo: str, title: any # The title of the issue.}
@optional {body: str # The contents of the issue., assignee: str # Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_, milestone: any, labels: [any] # Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._, assignees: [str] # Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._}
@returns(201) {id: int, node_id: str, url: str(uri), repository_url: str(uri), labels_url: str, comments_url: str(uri), events_url: str(uri), html_url: str(uri), number: int, state: str, title: str, body: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, labels: [any], assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, locked: bool, active_lock_reason: str?, comments: int, pull_request: map{merged_at: str(date-time)?, diff_url: str(uri)?, html_url: str(uri)?, patch_url: str(uri)?, url: str(uri)?}, closed_at: str(date-time)?, created_at: str(date-time), updated_at: str(date-time), closed_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body_html: str, body_text: str, timeline_url: str(uri), repository: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, author_association: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {403: Forbidden, 404: Resource not found, 410: Gone, 422: Validation failed, 503: Service unavailable}
@example_request {"title":"Found a bug","body":"I'm having a problem with this.","assignees":["octocat"],"milestone":1,"labels":["bug"]}

@endpoint GET /repos/{owner}/{repo}/issues/comments
@desc List issue comments for a repository
@required {owner: str, repo: str}
@optional {sort: str(created/updated)=created # One of `created` (when the repository was starred) or `updated` (when it was last pushed to)., direction: str(asc/desc) # Either `asc` or `desc`. Ignored without the `sort` parameter., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/issues/comments/{comment_id}
@desc Get an issue comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter}
@returns(200) {id: int, node_id: str, url: str(uri), body: str, body_text: str, body_html: str, html_url: str(uri), user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), issue_url: str(uri), author_association: str, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {404: Resource not found}

@endpoint PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}
@desc Update an issue comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter, body: str # The contents of the comment.}
@returns(200) {id: int, node_id: str, url: str(uri), body: str, body_text: str, body_html: str, html_url: str(uri), user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), issue_url: str(uri), author_association: str, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {422: Validation failed}
@example_request {"body":"Me too"}

@endpoint DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}
@desc Delete an issue comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions
@desc List reactions for an issue comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter}
@optional {content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # Returns a single [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found, 415: Preview header missing}

@endpoint POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions
@desc Create reaction for an issue comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter, content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # The [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types) to add to the issue comment.}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Reaction exists
@returns(201) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Reaction created
@errors {415: Preview header missing, 422: Validation failed}
@example_request {"content":"heart"}

@endpoint DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}
@desc Delete an issue comment reaction
@required {owner: str, repo: str, comment_id: int # comment_id parameter, reaction_id: int}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/issues/events
@desc List issue events for a repository
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/issues/events/{event_id}
@desc Get an issue event
@required {owner: str, repo: str, event_id: int}
@returns(200) {id: int, node_id: str, url: str(uri), actor: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, event: str, commit_id: str?, commit_url: str?, created_at: str(date-time), issue: map{id: int, node_id: str, url: str(uri), repository_url: str(uri), labels_url: str, comments_url: str(uri), events_url: str(uri), html_url: str(uri), number: int, state: str, title: str, body: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, labels: [map], assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, locked: bool, active_lock_reason: str?, comments: int, pull_request: map{merged_at: str(date-time)?, diff_url: str(uri)?, html_url: str(uri)?, patch_url: str(uri)?, url: str(uri)?}, closed_at: str(date-time)?, created_at: str(date-time), updated_at: str(date-time), author_association: str, body_html: str, body_text: str, timeline_url: str(uri), repository: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}}, label: map{name: str?, color: str?}, assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assigner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, review_requester: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, requested_reviewer: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, requested_team: map{id: int, node_id: str, name: str, slug: str, description: str?, privacy: str, permission: str, permissions: map{pull: bool, triage: bool, push: bool, maintain: bool, admin: bool}, url: str(uri), html_url: str(uri), members_url: str, repositories_url: str(uri), parent: map?{id: int, node_id: str, url: str(uri), members_url: str, name: str, description: str?, permission: str, privacy: str, html_url: str(uri), repositories_url: str(uri), slug: str, ldap_dn: str}}, dismissed_review: map{state: str, review_id: int, dismissal_message: str?, dismissal_commit_id: str?}, milestone: map{title: str}, project_card: map{url: str(uri), id: int, project_url: str(uri), project_id: int, column_name: str, previous_column_name: str}, rename: map{from: str, to: str}, author_association: str, lock_reason: str?, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}} # Response
@errors {403: Forbidden, 404: Resource not found, 410: Gone}

@endpoint GET /repos/{owner}/{repo}/issues/{issue_number}
@desc Get an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@returns(200) {id: int, node_id: str, url: str(uri), repository_url: str(uri), labels_url: str, comments_url: str(uri), events_url: str(uri), html_url: str(uri), number: int, state: str, title: str, body: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, labels: [any], assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, locked: bool, active_lock_reason: str?, comments: int, pull_request: map{merged_at: str(date-time)?, diff_url: str(uri)?, html_url: str(uri)?, patch_url: str(uri)?, url: str(uri)?}, closed_at: str(date-time)?, created_at: str(date-time), updated_at: str(date-time), closed_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body_html: str, body_text: str, timeline_url: str(uri), repository: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, author_association: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {301: Moved permanently, 304: Not modified, 404: Resource not found, 410: Gone}

@endpoint PATCH /repos/{owner}/{repo}/issues/{issue_number}
@desc Update an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@optional {title: any # The title of the issue., body: str # The contents of the issue., assignee: str # Login for the user that this issue should be assigned to. **This field is deprecated.**, state: str(open/closed) # State of the issue. Either `open` or `closed`., milestone: any, labels: [any] # Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._, assignees: [str] # Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._}
@returns(200) {id: int, node_id: str, url: str(uri), repository_url: str(uri), labels_url: str, comments_url: str(uri), events_url: str(uri), html_url: str(uri), number: int, state: str, title: str, body: str?, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, labels: [any], assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, locked: bool, active_lock_reason: str?, comments: int, pull_request: map{merged_at: str(date-time)?, diff_url: str(uri)?, html_url: str(uri)?, patch_url: str(uri)?, url: str(uri)?}, closed_at: str(date-time)?, created_at: str(date-time), updated_at: str(date-time), closed_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body_html: str, body_text: str, timeline_url: str(uri), repository: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, author_association: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {301: Moved permanently, 403: Forbidden, 404: Resource not found, 410: Gone, 422: Validation failed, 503: Service unavailable}
@example_request {"title":"Found a bug","body":"I'm having a problem with this.","assignees":["octocat"],"milestone":1,"state":"open","labels":["bug"]}

@endpoint POST /repos/{owner}/{repo}/issues/{issue_number}/assignees
@desc Add assignees to an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@optional {assignees: [str] # Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._}
@returns(201) {id: int, node_id: str, url: str(uri), repository_url: str(uri), labels_url: str, comments_url: str(uri), events_url: str(uri), html_url: str(uri), number: int, state: str, title: str, body: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, labels: [map], assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, locked: bool, active_lock_reason: str?, comments: int, pull_request: map{merged_at: str(date-time)?, diff_url: str(uri)?, html_url: str(uri)?, patch_url: str(uri)?, url: str(uri)?}, closed_at: str(date-time)?, created_at: str(date-time), updated_at: str(date-time), author_association: str, body_html: str, body_text: str, timeline_url: str(uri), repository: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}} # Response
@example_request {"assignees":["hubot","other_user"]}

@endpoint DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees
@desc Remove assignees from an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@optional {assignees: [str] # Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._}
@returns(200) {id: int, node_id: str, url: str(uri), repository_url: str(uri), labels_url: str, comments_url: str(uri), events_url: str(uri), html_url: str(uri), number: int, state: str, title: str, body: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, labels: [map], assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, locked: bool, active_lock_reason: str?, comments: int, pull_request: map{merged_at: str(date-time)?, diff_url: str(uri)?, html_url: str(uri)?, patch_url: str(uri)?, url: str(uri)?}, closed_at: str(date-time)?, created_at: str(date-time), updated_at: str(date-time), author_association: str, body_html: str, body_text: str, timeline_url: str(uri), repository: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}} # Response
@example_request {"assignees":["hubot","other_user"]}

@endpoint GET /repos/{owner}/{repo}/issues/{issue_number}/comments
@desc List issue comments
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@optional {since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found, 410: Gone}

@endpoint POST /repos/{owner}/{repo}/issues/{issue_number}/comments
@desc Create an issue comment
@required {owner: str, repo: str, issue_number: int # issue_number parameter, body: str # The contents of the comment.}
@returns(201) {id: int, node_id: str, url: str(uri), body: str, body_text: str, body_html: str, html_url: str(uri), user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), issue_url: str(uri), author_association: str, performed_via_github_app: map?{id: int, slug: str, node_id: str, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, name: str, description: str?, external_url: str(uri), html_url: str(uri), created_at: str(date-time), updated_at: str(date-time), permissions: map{issues: str, checks: str, metadata: str, contents: str, deployments: str}, events: [str], installations_count: int, client_id: str, client_secret: str, webhook_secret: str?, pem: str}, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {403: Forbidden, 404: Resource not found, 410: Gone, 422: Validation failed}
@example_request {"body":"Me too"}

@endpoint GET /repos/{owner}/{repo}/issues/{issue_number}/events
@desc List issue events
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {410: Gone}

@endpoint GET /repos/{owner}/{repo}/issues/{issue_number}/labels
@desc List labels for an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {410: Gone}

@endpoint POST /repos/{owner}/{repo}/issues/{issue_number}/labels
@desc Add labels to an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@returns(200) Response
@errors {410: Gone, 422: Validation failed}
@example_request {"labels":["bug","enhancement"]}

@endpoint PUT /repos/{owner}/{repo}/issues/{issue_number}/labels
@desc Set labels for an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@returns(200) Response
@errors {410: Gone, 422: Validation failed}
@example_request {"labels":["bug","enhancement"]}

@endpoint DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels
@desc Remove all labels from an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@returns(204) Response
@errors {410: Gone}

@endpoint DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}
@desc Remove a label from an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter, name: str}
@returns(200) Response
@errors {404: Resource not found, 410: Gone}

@endpoint PUT /repos/{owner}/{repo}/issues/{issue_number}/lock
@desc Lock an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@optional {lock_reason: str(off-topic/too heated/resolved/spam) # The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:   \* `off-topic`   \* `too heated`   \* `resolved`   \* `spam`}
@returns(204) Response
@errors {403: Forbidden, 404: Resource not found, 410: Gone, 422: Validation failed}

@endpoint DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock
@desc Unlock an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@returns(204) Response
@errors {403: Forbidden, 404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/issues/{issue_number}/reactions
@desc List reactions for an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@optional {content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # Returns a single [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found, 410: Gone, 415: Preview header missing}

@endpoint POST /repos/{owner}/{repo}/issues/{issue_number}/reactions
@desc Create reaction for an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter, content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # The [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types) to add to the issue.}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Response
@returns(201) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Response
@errors {415: Preview header missing, 422: Validation failed}
@example_request {"content":"heart"}

@endpoint DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}
@desc Delete an issue reaction
@required {owner: str, repo: str, issue_number: int # issue_number parameter, reaction_id: int}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/issues/{issue_number}/timeline
@desc List timeline events for an issue
@required {owner: str, repo: str, issue_number: int # issue_number parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found, 410: Gone}

@endpoint GET /repos/{owner}/{repo}/keys
@desc List deploy keys
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /repos/{owner}/{repo}/keys
@desc Create a deploy key
@required {owner: str, repo: str, key: str # The contents of the key.}
@optional {title: str # A name for the key., read_only: bool # If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.      Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)."}
@returns(201) {id: int, key: str, url: str, title: str, verified: bool, created_at: str, read_only: bool} # Response
@errors {422: Validation failed}
@example_request {"title":"octocat@octomac","key":"ssh-rsa AAA...","read_only":true}

@endpoint GET /repos/{owner}/{repo}/keys/{key_id}
@desc Get a deploy key
@required {owner: str, repo: str, key_id: int # key_id parameter}
@returns(200) {id: int, key: str, url: str, title: str, verified: bool, created_at: str, read_only: bool} # Response
@errors {404: Resource not found}

@endpoint DELETE /repos/{owner}/{repo}/keys/{key_id}
@desc Delete a deploy key
@required {owner: str, repo: str, key_id: int # key_id parameter}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/labels
@desc List labels for a repository
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/labels
@desc Create a label
@required {owner: str, repo: str, name: str # The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)."}
@optional {color: str # The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`., description: str # A short description of the label.}
@returns(201) {id: int(int64), node_id: str, url: str(uri), name: str, description: str?, color: str, default: bool} # Response
@errors {404: Resource not found, 422: Validation failed}
@example_request {"name":"bug","description":"Something isn't working","color":"f29513"}

@endpoint GET /repos/{owner}/{repo}/labels/{name}
@desc Get a label
@required {owner: str, repo: str, name: str}
@returns(200) {id: int(int64), node_id: str, url: str(uri), name: str, description: str?, color: str, default: bool} # Response
@errors {404: Resource not found}

@endpoint PATCH /repos/{owner}/{repo}/labels/{name}
@desc Update a label
@required {owner: str, repo: str, name: str}
@optional {new_name: str # The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet).", color: str # The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`., description: str # A short description of the label.}
@returns(200) {id: int(int64), node_id: str, url: str(uri), name: str, description: str?, color: str, default: bool} # Response
@example_request {"new_name":"bug :bug:","description":"Small bug fix required","color":"b01f26"}

@endpoint DELETE /repos/{owner}/{repo}/labels/{name}
@desc Delete a label
@required {owner: str, repo: str, name: str}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/languages
@desc List repository languages
@required {owner: str, repo: str}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/license
@desc Get the license for a repository
@required {owner: str, repo: str}
@returns(200) {name: str, path: str, sha: str, size: int, url: str(uri), html_url: str(uri)?, git_url: str(uri)?, download_url: str(uri)?, type: str, content: str, encoding: str, _links: map{git: str(uri)?, html: str(uri)?, self: str(uri)}, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}} # Response

@endpoint POST /repos/{owner}/{repo}/merges
@desc Merge a branch
@required {owner: str, repo: str, base: str # The name of the base branch that the head will be merged into., head: str # The head to merge. This can be a branch name or a commit SHA1.}
@optional {commit_message: str # Commit message to use for the merge commit. If omitted, a default message will be used.}
@returns(201) {url: str(uri), sha: str, node_id: str, html_url: str(uri), comments_url: str(uri), commit: map{url: str(uri), author: map?{name: str, email: str, date: str}, committer: map?{name: str, email: str, date: str}, message: str, comment_count: int, tree: map{sha: str, url: str(uri)}, verification: map{verified: bool, reason: str, payload: str?, signature: str?}}, author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, committer: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, parents: [map], stats: map{additions: int, deletions: int, total: int}, files: [map]} # Successful Response (The resulting merge commit)
@returns(204) Response when already merged
@errors {403: Forbidden, 404: Not Found when the base or head does not exist, 409: Conflict when there is a merge conflict, 422: Validation failed}
@example_request {"base":"master","head":"cool_feature","commit_message":"Shipped cool_feature!"}

@endpoint GET /repos/{owner}/{repo}/milestones
@desc List milestones
@required {owner: str, repo: str}
@optional {state: str(open/closed/all)=open # The state of the milestone. Either `open`, `closed`, or `all`., sort: str(due_on/completeness)=due_on # What to sort results by. Either `due_on` or `completeness`., direction: str(asc/desc)=asc # The direction of the sort. Either `asc` or `desc`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/milestones
@desc Create a milestone
@required {owner: str, repo: str, title: str # The title of the milestone.}
@optional {state: str(open/closed)=open # The state of the milestone. Either `open` or `closed`., description: str # A description of the milestone., due_on: str(date-time) # The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.}
@returns(201) {url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?} # Response
@errors {404: Resource not found, 422: Validation failed}
@example_request {"title":"v1.0","state":"open","description":"Tracking milestone for version 1.0","due_on":"2012-10-09T23:39:01Z"}

@endpoint GET /repos/{owner}/{repo}/milestones/{milestone_number}
@desc Get a milestone
@required {owner: str, repo: str, milestone_number: int # milestone_number parameter}
@returns(200) {url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?} # Response
@errors {404: Resource not found}

@endpoint PATCH /repos/{owner}/{repo}/milestones/{milestone_number}
@desc Update a milestone
@required {owner: str, repo: str, milestone_number: int # milestone_number parameter}
@optional {title: str # The title of the milestone., state: str(open/closed)=open # The state of the milestone. Either `open` or `closed`., description: str # A description of the milestone., due_on: str(date-time) # The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.}
@returns(200) {url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?} # Response
@example_request {"title":"v1.0","state":"open","description":"Tracking milestone for version 1.0","due_on":"2012-10-09T23:39:01Z"}

@endpoint DELETE /repos/{owner}/{repo}/milestones/{milestone_number}
@desc Delete a milestone
@required {owner: str, repo: str, milestone_number: int # milestone_number parameter}
@returns(204) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels
@desc List labels for issues in a milestone
@required {owner: str, repo: str, milestone_number: int # milestone_number parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/notifications
@desc List repository notifications for the authenticated user
@required {owner: str, repo: str}
@optional {all: bool=false # If `true`, show notifications marked as read., participating: bool=false # If `true`, only shows notifications in which the user is directly participating or mentioned., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., before: str(date-time) # Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint PUT /repos/{owner}/{repo}/notifications
@desc Mark repository notifications as read
@required {owner: str, repo: str}
@optional {last_read_at: str(date-time) # Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.}
@returns(202) {message: str, url: str} # Response
@returns(205) Reset Content

@endpoint GET /repos/{owner}/{repo}/pages
@desc Get a GitHub Enterprise Server Pages site
@required {owner: str, repo: str}
@returns(200) {url: str(uri), status: str?, cname: str?, custom_404: bool, html_url: str(uri), source: map{branch: str, path: str}, public: bool, https_certificate: map{state: str, description: str, domains: [any], expires_at: str(date)}, https_enforced: bool} # Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/pages
@desc Create a GitHub Pages site
@required {owner: str, repo: str, source: map{branch!: str, path: str} # The source branch and directory used to publish your Pages site.}
@returns(201) {url: str(uri), status: str?, cname: str?, custom_404: bool, html_url: str(uri), source: map{branch: str, path: str}, public: bool, https_certificate: map{state: str, description: str, domains: [any], expires_at: str(date)}, https_enforced: bool} # Response
@errors {409: Conflict, 415: Preview header missing, 422: Validation failed}
@example_request {"source":{"branch":"master","path":"/docs"}}

@endpoint PUT /repos/{owner}/{repo}/pages
@desc Update information about a GitHub Pages site
@required {owner: str, repo: str}
@optional {https_enforced: bool # Specify whether HTTPS should be enforced for the repository., public: bool # Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan., source: str(gh-pages/master/master /docs) # Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`.}
@returns(204) Response
@errors {400: Bad Request, 422: Validation failed}
@example_request {"source":"master /docs"}

@endpoint DELETE /repos/{owner}/{repo}/pages
@desc Delete a GitHub Enterprise Server Pages site
@required {owner: str, repo: str}
@returns(204) Response
@errors {404: Resource not found, 415: Preview header missing, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/pages/builds
@desc List GitHub Enterprise Server Pages builds
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /repos/{owner}/{repo}/pages/builds
@desc Request a GitHub Enterprise Server Pages build
@required {owner: str, repo: str}
@returns(201) {url: str(uri), status: str} # Response

@endpoint GET /repos/{owner}/{repo}/pages/builds/latest
@desc Get latest Pages build
@required {owner: str, repo: str}
@returns(200) {url: str(uri), status: str, error: map{message: str?}, pusher: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, commit: str, duration: int, created_at: str(date-time), updated_at: str(date-time)} # Response

@endpoint GET /repos/{owner}/{repo}/pages/builds/{build_id}
@desc Get GitHub Enterprise Server Pages build
@required {owner: str, repo: str, build_id: int}
@returns(200) {url: str(uri), status: str, error: map{message: str?}, pusher: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, commit: str, duration: int, created_at: str(date-time), updated_at: str(date-time)} # Response

@endpoint GET /repos/{owner}/{repo}/pre-receive-hooks
@desc List pre-receive hooks for a repository
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., sort: str(created/updated/name)=created}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}
@desc Get a pre-receive hook for a repository
@required {owner: str, repo: str, pre_receive_hook_id: int # pre_receive_hook_id parameter}
@returns(200) {id: int, name: str, enforcement: str, configuration_url: str} # Response

@endpoint PATCH /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}
@desc Update pre-receive hook enforcement for a repository
@required {owner: str, repo: str, pre_receive_hook_id: int # pre_receive_hook_id parameter}
@optional {enforcement: str(enabled/disabled/testing) # The state of enforcement for the hook on this repository.}
@returns(200) {id: int, name: str, enforcement: str, configuration_url: str} # Response
@example_request {"enforcement":"enabled"}

@endpoint DELETE /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}
@desc Remove pre-receive hook enforcement for a repository
@required {owner: str, repo: str, pre_receive_hook_id: int # pre_receive_hook_id parameter}
@returns(200) {id: int, name: str, enforcement: str, configuration_url: str} # Responds with effective values inherited from owner and/or global level.

@endpoint GET /repos/{owner}/{repo}/projects
@desc List repository projects
@required {owner: str, repo: str}
@optional {state: str(open/closed/all)=open # Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {401: Requires authentication, 403: Forbidden, 404: Resource not found, 410: Gone, 422: Validation failed}

@endpoint POST /repos/{owner}/{repo}/projects
@desc Create a repository project
@required {owner: str, repo: str, name: str # The name of the project.}
@optional {body: str # The description of the project.}
@returns(201) {owner_url: str(uri), url: str(uri), html_url: str(uri), columns_url: str(uri), id: int, node_id: str, name: str, body: str?, number: int, state: str, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), organization_permission: str, private: bool} # Response
@errors {401: Requires authentication, 403: Forbidden, 404: Resource not found, 410: Gone, 422: Validation failed}
@example_request {"name":"Projects Documentation","body":"Developer documentation project for the developer site."}

@endpoint GET /repos/{owner}/{repo}/pulls
@desc List pull requests
@required {owner: str, repo: str}
@optional {state: str(open/closed/all)=open # Either `open`, `closed`, or `all` to filter by state., head: str # Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`., base: str # Filter pulls by base branch name. Example: `gh-pages`., sort: str(created/updated/popularity/long-running)=created # What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month)., direction: str(asc/desc) # The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 422: Validation failed}

@endpoint POST /repos/{owner}/{repo}/pulls
@desc Create a pull request
@required {owner: str, repo: str, head: str # The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`., base: str # The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.}
@optional {title: str # The title of the new pull request., body: str # The contents of the pull request., maintainer_can_modify: bool # Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request., draft: bool # Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more., issue: int}
@returns(201) {url: str(uri), id: int, node_id: str, html_url: str(uri), diff_url: str(uri), patch_url: str(uri), issue_url: str(uri), commits_url: str(uri), review_comments_url: str(uri), review_comment_url: str, comments_url: str(uri), statuses_url: str(uri), number: int, state: str, locked: bool, title: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str?, labels: [map], milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, active_lock_reason: str?, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, merged_at: str(date-time)?, merge_commit_sha: str?, assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, requested_reviewers: [map]?, requested_teams: [map]?, head: map{label: str, ref: str, repo: map?{archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), description: str?, downloads_url: str(uri), events_url: str(uri), fork: bool, forks_url: str(uri), full_name: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, hooks_url: str(uri), html_url: str(uri), id: int, node_id: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, name: str, notifications_url: str, owner: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}, private: bool, pulls_url: str, releases_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, url: str(uri), clone_url: str, default_branch: str, forks: int, forks_count: int, git_url: str, has_downloads: bool, has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, homepage: str(uri)?, language: str?, master_branch: str, archived: bool, disabled: bool, mirror_url: str(uri)?, open_issues: int, open_issues_count: int, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_merge_commit: bool, allow_squash_merge: bool, allow_rebase_merge: bool, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str}, pushed_at: str(date-time), size: int, ssh_url: str, stargazers_count: int, svn_url: str(uri), topics: [str], watchers: int, watchers_count: int, created_at: str(date-time), updated_at: str(date-time), allow_forking: bool, anonymous_access_enabled: bool}, sha: str, user: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}}, base: map{label: str, ref: str, repo: map{archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), description: str?, downloads_url: str(uri), events_url: str(uri), fork: bool, forks_url: str(uri), full_name: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, hooks_url: str(uri), html_url: str(uri), id: int, node_id: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, name: str, notifications_url: str, owner: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}, private: bool, pulls_url: str, releases_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, url: str(uri), clone_url: str, default_branch: str, forks: int, forks_count: int, git_url: str, has_downloads: bool, has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, homepage: str(uri)?, language: str?, master_branch: str, archived: bool, disabled: bool, mirror_url: str(uri)?, open_issues: int, open_issues_count: int, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_merge_commit: bool, allow_squash_merge: bool, allow_rebase_merge: bool, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, pushed_at: str(date-time), size: int, ssh_url: str, stargazers_count: int, svn_url: str(uri), topics: [str], watchers: int, watchers_count: int, created_at: str(date-time), updated_at: str(date-time), allow_forking: bool, anonymous_access_enabled: bool}, sha: str, user: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}}, _links: map{comments: map{href: str}, commits: map{href: str}, statuses: map{href: str}, html: map{href: str}, issue: map{href: str}, review_comments: map{href: str}, review_comment: map{href: str}, self: map{href: str}}, author_association: str, draft: bool, merged: bool, mergeable: bool?, rebaseable: bool?, mergeable_state: str, merged_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, comments: int, review_comments: int, maintainer_can_modify: bool, commits: int, additions: int, deletions: int, changed_files: int} # Response
@errors {403: Forbidden, 422: Validation failed}
@example_request {"title":"Amazing new feature","body":"Please pull these awesome changes in!","head":"octocat:new-feature","base":"master"}

@endpoint GET /repos/{owner}/{repo}/pulls/comments
@desc List review comments in a repository
@required {owner: str, repo: str}
@optional {sort: str(created/updated/created_at), direction: str(asc/desc) # Can be either `asc` or `desc`. Ignored without `sort` parameter., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/pulls/comments/{comment_id}
@desc Get a review comment for a pull request
@required {owner: str, repo: str, comment_id: int # comment_id parameter}
@returns(200) {url: str, pull_request_review_id: int?, id: int, node_id: str, diff_hunk: str, path: str, position: int, original_position: int, commit_id: str, original_commit_id: str, in_reply_to_id: int, user: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, created_at: str(date-time), updated_at: str(date-time), html_url: str(uri), pull_request_url: str(uri), author_association: str, _links: map{self: map{href: str(uri)}, html: map{href: str(uri)}, pull_request: map{href: str(uri)}}, start_line: int?, original_start_line: int?, start_side: str?, line: int, original_line: int, side: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}, body_html: str, body_text: str} # Response
@errors {404: Resource not found}

@endpoint PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}
@desc Update a review comment for a pull request
@required {owner: str, repo: str, comment_id: int # comment_id parameter, body: str # The text of the reply to the review comment.}
@returns(200) {url: str, pull_request_review_id: int?, id: int, node_id: str, diff_hunk: str, path: str, position: int, original_position: int, commit_id: str, original_commit_id: str, in_reply_to_id: int, user: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, created_at: str(date-time), updated_at: str(date-time), html_url: str(uri), pull_request_url: str(uri), author_association: str, _links: map{self: map{href: str(uri)}, html: map{href: str(uri)}, pull_request: map{href: str(uri)}}, start_line: int?, original_start_line: int?, start_side: str?, line: int, original_line: int, side: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}, body_html: str, body_text: str} # Response
@example_request {"body":"I like this too!"}

@endpoint DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}
@desc Delete a review comment for a pull request
@required {owner: str, repo: str, comment_id: int # comment_id parameter}
@returns(204) Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions
@desc List reactions for a pull request review comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter}
@optional {content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # Returns a single [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found, 415: Preview header missing}

@endpoint POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions
@desc Create reaction for a pull request review comment
@required {owner: str, repo: str, comment_id: int # comment_id parameter, content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # The [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types) to add to the pull request review comment.}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Reaction exists
@returns(201) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Reaction created
@errors {415: Preview header missing, 422: Validation failed}
@example_request {"content":"heart"}

@endpoint DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}
@desc Delete a pull request comment reaction
@required {owner: str, repo: str, comment_id: int # comment_id parameter, reaction_id: int}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/pulls/{pull_number}
@desc Get a pull request
@required {owner: str, repo: str, pull_number: int}
@returns(200) {url: str(uri), id: int, node_id: str, html_url: str(uri), diff_url: str(uri), patch_url: str(uri), issue_url: str(uri), commits_url: str(uri), review_comments_url: str(uri), review_comment_url: str, comments_url: str(uri), statuses_url: str(uri), number: int, state: str, locked: bool, title: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str?, labels: [map], milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, active_lock_reason: str?, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, merged_at: str(date-time)?, merge_commit_sha: str?, assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, requested_reviewers: [map]?, requested_teams: [map]?, head: map{label: str, ref: str, repo: map?{archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), description: str?, downloads_url: str(uri), events_url: str(uri), fork: bool, forks_url: str(uri), full_name: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, hooks_url: str(uri), html_url: str(uri), id: int, node_id: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, name: str, notifications_url: str, owner: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}, private: bool, pulls_url: str, releases_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, url: str(uri), clone_url: str, default_branch: str, forks: int, forks_count: int, git_url: str, has_downloads: bool, has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, homepage: str(uri)?, language: str?, master_branch: str, archived: bool, disabled: bool, mirror_url: str(uri)?, open_issues: int, open_issues_count: int, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_merge_commit: bool, allow_squash_merge: bool, allow_rebase_merge: bool, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str}, pushed_at: str(date-time), size: int, ssh_url: str, stargazers_count: int, svn_url: str(uri), topics: [str], watchers: int, watchers_count: int, created_at: str(date-time), updated_at: str(date-time), allow_forking: bool, anonymous_access_enabled: bool}, sha: str, user: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}}, base: map{label: str, ref: str, repo: map{archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), description: str?, downloads_url: str(uri), events_url: str(uri), fork: bool, forks_url: str(uri), full_name: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, hooks_url: str(uri), html_url: str(uri), id: int, node_id: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, name: str, notifications_url: str, owner: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}, private: bool, pulls_url: str, releases_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, url: str(uri), clone_url: str, default_branch: str, forks: int, forks_count: int, git_url: str, has_downloads: bool, has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, homepage: str(uri)?, language: str?, master_branch: str, archived: bool, disabled: bool, mirror_url: str(uri)?, open_issues: int, open_issues_count: int, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_merge_commit: bool, allow_squash_merge: bool, allow_rebase_merge: bool, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, pushed_at: str(date-time), size: int, ssh_url: str, stargazers_count: int, svn_url: str(uri), topics: [str], watchers: int, watchers_count: int, created_at: str(date-time), updated_at: str(date-time), allow_forking: bool, anonymous_access_enabled: bool}, sha: str, user: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}}, _links: map{comments: map{href: str}, commits: map{href: str}, statuses: map{href: str}, html: map{href: str}, issue: map{href: str}, review_comments: map{href: str}, review_comment: map{href: str}, self: map{href: str}}, author_association: str, draft: bool, merged: bool, mergeable: bool?, rebaseable: bool?, mergeable_state: str, merged_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, comments: int, review_comments: int, maintainer_can_modify: bool, commits: int, additions: int, deletions: int, changed_files: int} # Pass the appropriate [media type](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
@errors {304: Not modified, 404: Resource not found, 500: Internal Error}

@endpoint PATCH /repos/{owner}/{repo}/pulls/{pull_number}
@desc Update a pull request
@required {owner: str, repo: str, pull_number: int}
@optional {title: str # The title of the pull request., body: str # The contents of the pull request., state: str(open/closed) # State of this Pull Request. Either `open` or `closed`., base: str # The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository., maintainer_can_modify: bool # Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.}
@returns(200) {url: str(uri), id: int, node_id: str, html_url: str(uri), diff_url: str(uri), patch_url: str(uri), issue_url: str(uri), commits_url: str(uri), review_comments_url: str(uri), review_comment_url: str, comments_url: str(uri), statuses_url: str(uri), number: int, state: str, locked: bool, title: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str?, labels: [map], milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, active_lock_reason: str?, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, merged_at: str(date-time)?, merge_commit_sha: str?, assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, requested_reviewers: [map]?, requested_teams: [map]?, head: map{label: str, ref: str, repo: map?{archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), description: str?, downloads_url: str(uri), events_url: str(uri), fork: bool, forks_url: str(uri), full_name: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, hooks_url: str(uri), html_url: str(uri), id: int, node_id: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, name: str, notifications_url: str, owner: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}, private: bool, pulls_url: str, releases_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, url: str(uri), clone_url: str, default_branch: str, forks: int, forks_count: int, git_url: str, has_downloads: bool, has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, homepage: str(uri)?, language: str?, master_branch: str, archived: bool, disabled: bool, mirror_url: str(uri)?, open_issues: int, open_issues_count: int, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_merge_commit: bool, allow_squash_merge: bool, allow_rebase_merge: bool, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str}, pushed_at: str(date-time), size: int, ssh_url: str, stargazers_count: int, svn_url: str(uri), topics: [str], watchers: int, watchers_count: int, created_at: str(date-time), updated_at: str(date-time), allow_forking: bool, anonymous_access_enabled: bool}, sha: str, user: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}}, base: map{label: str, ref: str, repo: map{archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), description: str?, downloads_url: str(uri), events_url: str(uri), fork: bool, forks_url: str(uri), full_name: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, hooks_url: str(uri), html_url: str(uri), id: int, node_id: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, name: str, notifications_url: str, owner: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}, private: bool, pulls_url: str, releases_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, url: str(uri), clone_url: str, default_branch: str, forks: int, forks_count: int, git_url: str, has_downloads: bool, has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, homepage: str(uri)?, language: str?, master_branch: str, archived: bool, disabled: bool, mirror_url: str(uri)?, open_issues: int, open_issues_count: int, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_merge_commit: bool, allow_squash_merge: bool, allow_rebase_merge: bool, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, pushed_at: str(date-time), size: int, ssh_url: str, stargazers_count: int, svn_url: str(uri), topics: [str], watchers: int, watchers_count: int, created_at: str(date-time), updated_at: str(date-time), allow_forking: bool, anonymous_access_enabled: bool}, sha: str, user: map{avatar_url: str(uri), events_url: str, followers_url: str(uri), following_url: str, gists_url: str, gravatar_id: str?, html_url: str(uri), id: int, node_id: str, login: str, organizations_url: str(uri), received_events_url: str(uri), repos_url: str(uri), site_admin: bool, starred_url: str, subscriptions_url: str(uri), type: str, url: str(uri)}}, _links: map{comments: map{href: str}, commits: map{href: str}, statuses: map{href: str}, html: map{href: str}, issue: map{href: str}, review_comments: map{href: str}, review_comment: map{href: str}, self: map{href: str}}, author_association: str, draft: bool, merged: bool, mergeable: bool?, rebaseable: bool?, mergeable_state: str, merged_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, comments: int, review_comments: int, maintainer_can_modify: bool, commits: int, additions: int, deletions: int, changed_files: int} # Response
@errors {403: Forbidden, 422: Validation failed}
@example_request {"title":"new title","body":"updated body","state":"open","base":"master"}

@endpoint GET /repos/{owner}/{repo}/pulls/{pull_number}/comments
@desc List review comments on a pull request
@required {owner: str, repo: str, pull_number: int}
@optional {sort: str(created/updated)=created # One of `created` (when the repository was starred) or `updated` (when it was last pushed to)., direction: str(asc/desc) # Can be either `asc` or `desc`. Ignored without `sort` parameter., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /repos/{owner}/{repo}/pulls/{pull_number}/comments
@desc Create a review comment for a pull request
@required {owner: str, repo: str, pull_number: int, body: str # The text of the review comment.}
@optional {commit_id: str # The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`., path: str # The relative path to the file that necessitates a comment., position: int # **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above., side: str(LEFT/RIGHT) # **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation., line: int # **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to., start_line: int # **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation., start_side: str(LEFT/RIGHT/side) # **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context., in_reply_to: int}
@returns(201) {url: str, pull_request_review_id: int?, id: int, node_id: str, diff_hunk: str, path: str, position: int, original_position: int, commit_id: str, original_commit_id: str, in_reply_to_id: int, user: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, created_at: str(date-time), updated_at: str(date-time), html_url: str(uri), pull_request_url: str(uri), author_association: str, _links: map{self: map{href: str(uri)}, html: map{href: str(uri)}, pull_request: map{href: str(uri)}}, start_line: int?, original_start_line: int?, start_side: str?, line: int, original_line: int, side: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}, body_html: str, body_text: str} # Response
@errors {403: Forbidden, 422: Validation failed}
@example_request {"body":"Let's add this deleted line back.","commit_id":"6dcb09b5b57875f334f61aebed695e2e4193db5e","path":"file1.txt","line":5,"side":"LEFT"}

@endpoint POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies
@desc Create a reply for a review comment
@required {owner: str, repo: str, pull_number: int, comment_id: int # comment_id parameter, body: str # The text of the review comment.}
@returns(201) {url: str, pull_request_review_id: int?, id: int, node_id: str, diff_hunk: str, path: str, position: int, original_position: int, commit_id: str, original_commit_id: str, in_reply_to_id: int, user: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, created_at: str(date-time), updated_at: str(date-time), html_url: str(uri), pull_request_url: str(uri), author_association: str, _links: map{self: map{href: str(uri)}, html: map{href: str(uri)}, pull_request: map{href: str(uri)}}, start_line: int?, original_start_line: int?, start_side: str?, line: int, original_line: int, side: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}, body_html: str, body_text: str} # Response
@errors {404: Resource not found}
@example_request {"body":"Great stuff!"}

@endpoint GET /repos/{owner}/{repo}/pulls/{pull_number}/commits
@desc List commits on a pull request
@required {owner: str, repo: str, pull_number: int}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/pulls/{pull_number}/files
@desc List pull requests files
@required {owner: str, repo: str, pull_number: int}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {422: Validation failed, 500: Internal Error}

@endpoint GET /repos/{owner}/{repo}/pulls/{pull_number}/merge
@desc Check if a pull request has been merged
@required {owner: str, repo: str, pull_number: int}
@returns(204) Response if pull request has been merged
@errors {404: Not Found if pull request has not been merged}

@endpoint PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge
@desc Merge a pull request
@required {owner: str, repo: str, pull_number: int}
@optional {commit_title: str # Title for the automatic commit message., commit_message: str # Extra detail to append to automatic commit message., sha: str # SHA that pull request head must match to allow merge., merge_method: str(merge/squash/rebase) # Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`.}
@returns(200) {sha: str, merged: bool, message: str} # if merge was successful
@errors {403: Forbidden, 404: Resource not found, 405: Method Not Allowed if merge cannot be performed, 409: Conflict if sha was provided and pull request head did not match, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
@desc List requested reviewers for a pull request
@required {owner: str, repo: str, pull_number: int}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {users: [map], teams: [map]} # Response

@endpoint POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
@desc Request reviewers for a pull request
@required {owner: str, repo: str, pull_number: int}
@optional {reviewers: [str] # An array of user `login`s that will be requested., team_reviewers: [str] # An array of team `slug`s that will be requested.}
@returns(201) {url: str(uri), id: int, node_id: str, html_url: str(uri), diff_url: str(uri), patch_url: str(uri), issue_url: str(uri), commits_url: str(uri), review_comments_url: str(uri), review_comment_url: str, comments_url: str(uri), statuses_url: str(uri), number: int, state: str, locked: bool, title: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str?, labels: [map], milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, active_lock_reason: str?, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, merged_at: str(date-time)?, merge_commit_sha: str?, assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, requested_reviewers: [map]?, requested_teams: [map]?, head: map{label: str, ref: str, repo: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, sha: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}, base: map{label: str, ref: str, repo: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, sha: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}, _links: map{comments: map{href: str}, commits: map{href: str}, statuses: map{href: str}, html: map{href: str}, issue: map{href: str}, review_comments: map{href: str}, review_comment: map{href: str}, self: map{href: str}}, author_association: str, draft: bool} # Response
@errors {403: Forbidden, 422: Unprocessable Entity if user is not a collaborator}
@example_request {"reviewers":["octocat","hubot","other_user"],"team_reviewers":["justice-league"]}

@endpoint DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
@desc Remove requested reviewers from a pull request
@required {owner: str, repo: str, pull_number: int, reviewers: [str] # An array of user `login`s that will be removed.}
@optional {team_reviewers: [str] # An array of team `slug`s that will be removed.}
@returns(200) {url: str(uri), id: int, node_id: str, html_url: str(uri), diff_url: str(uri), patch_url: str(uri), issue_url: str(uri), commits_url: str(uri), review_comments_url: str(uri), review_comment_url: str, comments_url: str(uri), statuses_url: str(uri), number: int, state: str, locked: bool, title: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str?, labels: [map], milestone: map?{url: str(uri), html_url: str(uri), labels_url: str(uri), id: int, node_id: str, number: int, state: str, title: str, description: str?, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, open_issues: int, closed_issues: int, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, due_on: str(date-time)?}, active_lock_reason: str?, created_at: str(date-time), updated_at: str(date-time), closed_at: str(date-time)?, merged_at: str(date-time)?, merge_commit_sha: str?, assignee: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assignees: [map]?, requested_reviewers: [map]?, requested_teams: [map]?, head: map{label: str, ref: str, repo: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, sha: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}, base: map{label: str, ref: str, repo: map{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, sha: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}}, _links: map{comments: map{href: str}, commits: map{href: str}, statuses: map{href: str}, html: map{href: str}, issue: map{href: str}, review_comments: map{href: str}, review_comment: map{href: str}, self: map{href: str}}, author_association: str, draft: bool} # Response
@errors {422: Validation failed}
@example_request {"reviewers":["octocat","hubot","other_user"],"team_reviewers":["justice-league"]}

@endpoint GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews
@desc List reviews for a pull request
@required {owner: str, repo: str, pull_number: int}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) The list of reviews returns in chronological order.

@endpoint POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews
@desc Create a review for a pull request
@required {owner: str, repo: str, pull_number: int}
@optional {commit_id: str # The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value., body: str # **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review., event: str(APPROVE/REQUEST_CHANGES/COMMENT) # The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/enterprise-server@2.21/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready., comments: [map{path!: str, position: int, body!: str, line: int, side: str, start_line: int, start_side: str}] # Use the following table to specify the location, destination, and contents of the draft review comment.}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, state: str, html_url: str(uri), pull_request_url: str(uri), _links: map{html: map{href: str}, pull_request: map{href: str}}, submitted_at: str(date-time), commit_id: str, body_html: str, body_text: str, author_association: str} # Response
@errors {403: Forbidden, 422: Validation failed}
@example_request {"commit_id":"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091","body":"This is close to perfect! Please address the suggested inline change.","event":"REQUEST_CHANGES","comments":[{"path":"file.md","position":6,"body":"Please add more information here, and fix this typo."}]}

@endpoint GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
@desc Get a review for a pull request
@required {owner: str, repo: str, pull_number: int, review_id: int # review_id parameter}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, state: str, html_url: str(uri), pull_request_url: str(uri), _links: map{html: map{href: str}, pull_request: map{href: str}}, submitted_at: str(date-time), commit_id: str, body_html: str, body_text: str, author_association: str} # Response
@errors {404: Resource not found}

@endpoint PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
@desc Update a review for a pull request
@required {owner: str, repo: str, pull_number: int, review_id: int # review_id parameter, body: str # The body text of the pull request review.}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, state: str, html_url: str(uri), pull_request_url: str(uri), _links: map{html: map{href: str}, pull_request: map{href: str}}, submitted_at: str(date-time), commit_id: str, body_html: str, body_text: str, author_association: str} # Response
@errors {422: Validation failed}
@example_request {"body":"This is close to perfect! Please address the suggested inline change. And add more about this."}

@endpoint DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
@desc Delete a pending review for a pull request
@required {owner: str, repo: str, pull_number: int, review_id: int # review_id parameter}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, state: str, html_url: str(uri), pull_request_url: str(uri), _links: map{html: map{href: str}, pull_request: map{href: str}}, submitted_at: str(date-time), commit_id: str, body_html: str, body_text: str, author_association: str} # Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments
@desc List comments for a pull request review
@required {owner: str, repo: str, pull_number: int, review_id: int # review_id parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals
@desc Dismiss a review for a pull request
@required {owner: str, repo: str, pull_number: int, review_id: int # review_id parameter, message: str # The message for the pull request review dismissal}
@optional {event: str}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, state: str, html_url: str(uri), pull_request_url: str(uri), _links: map{html: map{href: str}, pull_request: map{href: str}}, submitted_at: str(date-time), commit_id: str, body_html: str, body_text: str, author_association: str} # Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events
@desc Submit a review for a pull request
@required {owner: str, repo: str, pull_number: int, review_id: int # review_id parameter, event: str(APPROVE/REQUEST_CHANGES/COMMENT) # The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action.}
@optional {body: str # The body text of the pull request review}
@returns(200) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, state: str, html_url: str(uri), pull_request_url: str(uri), _links: map{html: map{href: str}, pull_request: map{href: str}}, submitted_at: str(date-time), commit_id: str, body_html: str, body_text: str, author_association: str} # Response
@errors {403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch
@desc Update a pull request branch
@required {owner: str, repo: str, pull_number: int}
@optional {expected_head_sha: str # The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/enterprise-server@2.21/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.}
@returns(202) {message: str, url: str} # Response
@errors {403: Forbidden, 415: Preview header missing, 422: Validation failed}
@example_request {"expected_head_sha":"6dcb09b5b57875f334f61aebed695e2e4193db5e"}

@endpoint GET /repos/{owner}/{repo}/readme
@desc Get a repository README
@required {owner: str, repo: str}
@optional {ref: str # The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)}
@returns(200) {type: str, encoding: str, size: int, name: str, path: str, content: str, sha: str, url: str(uri), git_url: str(uri)?, html_url: str(uri)?, download_url: str(uri)?, _links: map{git: str(uri)?, html: str(uri)?, self: str(uri)}, target: str, submodule_git_url: str} # Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/readme/{dir}
@desc Get a repository README for a directory
@required {owner: str, repo: str, dir: str # The alternate path to look for a README file}
@optional {ref: str # The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)}
@returns(200) {type: str, encoding: str, size: int, name: str, path: str, content: str, sha: str, url: str(uri), git_url: str(uri)?, html_url: str(uri)?, download_url: str(uri)?, _links: map{git: str(uri)?, html: str(uri)?, self: str(uri)}, target: str, submodule_git_url: str} # Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/releases
@desc List releases
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint POST /repos/{owner}/{repo}/releases
@desc Create a release
@required {owner: str, repo: str, tag_name: str # The name of the tag.}
@optional {target_commitish: str # Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`)., name: str # The name of the release., body: str # Text describing the contents of the tag., draft: bool=false # `true` to create a draft (unpublished) release, `false` to create a published one., prerelease: bool=false # `true` to identify the release as a prerelease. `false` to identify the release as a full release.}
@returns(201) {url: str(uri), html_url: str(uri), assets_url: str(uri), upload_url: str, tarball_url: str(uri)?, zipball_url: str(uri)?, id: int, node_id: str, tag_name: str, target_commitish: str, name: str?, body: str?, draft: bool, prerelease: bool, created_at: str(date-time), published_at: str(date-time)?, author: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assets: [map], body_html: str, body_text: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {422: Validation failed}
@example_request {"tag_name":"v1.0.0","target_commitish":"master","name":"v1.0.0","body":"Description of the release","draft":false,"prerelease":false}

@endpoint GET /repos/{owner}/{repo}/releases/assets/{asset_id}
@desc Get a release asset
@required {owner: str, repo: str, asset_id: int # asset_id parameter}
@returns(200) {url: str(uri), browser_download_url: str(uri), id: int, node_id: str, name: str, label: str?, state: str, content_type: str, size: int, download_count: int, created_at: str(date-time), updated_at: str(date-time), uploader: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}} # To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response.
@errors {302: Found, 404: Resource not found, 415: Preview header missing}

@endpoint PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}
@desc Update a release asset
@required {owner: str, repo: str, asset_id: int # asset_id parameter}
@optional {name: str # The file name of the asset., label: str # An alternate short description of the asset. Used in place of the filename., state: str}
@returns(200) {url: str(uri), browser_download_url: str(uri), id: int, node_id: str, name: str, label: str?, state: str, content_type: str, size: int, download_count: int, created_at: str(date-time), updated_at: str(date-time), uploader: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}} # Response
@example_request {"name":"foo-1.0.0-osx.zip","label":"Mac binary"}

@endpoint DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}
@desc Delete a release asset
@required {owner: str, repo: str, asset_id: int # asset_id parameter}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/releases/latest
@desc Get the latest release
@required {owner: str, repo: str}
@returns(200) {url: str(uri), html_url: str(uri), assets_url: str(uri), upload_url: str, tarball_url: str(uri)?, zipball_url: str(uri)?, id: int, node_id: str, tag_name: str, target_commitish: str, name: str?, body: str?, draft: bool, prerelease: bool, created_at: str(date-time), published_at: str(date-time)?, author: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assets: [map], body_html: str, body_text: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response

@endpoint GET /repos/{owner}/{repo}/releases/tags/{tag}
@desc Get a release by tag name
@required {owner: str, repo: str, tag: str # tag parameter}
@returns(200) {url: str(uri), html_url: str(uri), assets_url: str(uri), upload_url: str, tarball_url: str(uri)?, zipball_url: str(uri)?, id: int, node_id: str, tag_name: str, target_commitish: str, name: str?, body: str?, draft: bool, prerelease: bool, created_at: str(date-time), published_at: str(date-time)?, author: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assets: [map], body_html: str, body_text: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/releases/{release_id}
@desc Get a release
@required {owner: str, repo: str, release_id: int # release_id parameter}
@returns(200) {url: str(uri), html_url: str(uri), assets_url: str(uri), upload_url: str, tarball_url: str(uri)?, zipball_url: str(uri)?, id: int, node_id: str, tag_name: str, target_commitish: str, name: str?, body: str?, draft: bool, prerelease: bool, created_at: str(date-time), published_at: str(date-time)?, author: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assets: [map], body_html: str, body_text: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/enterprise-server@2.21/rest/overview/resources-in-the-rest-api#hypermedia).
@errors {404: Resource not found}

@endpoint PATCH /repos/{owner}/{repo}/releases/{release_id}
@desc Update a release
@required {owner: str, repo: str, release_id: int # release_id parameter}
@optional {tag_name: str # The name of the tag., target_commitish: str # Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`)., name: str # The name of the release., body: str # Text describing the contents of the tag., draft: bool # `true` makes the release a draft, and `false` publishes the release., prerelease: bool # `true` to identify the release as a prerelease, `false` to identify the release as a full release.}
@returns(200) {url: str(uri), html_url: str(uri), assets_url: str(uri), upload_url: str, tarball_url: str(uri)?, zipball_url: str(uri)?, id: int, node_id: str, tag_name: str, target_commitish: str, name: str?, body: str?, draft: bool, prerelease: bool, created_at: str(date-time), published_at: str(date-time)?, author: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, assets: [map], body_html: str, body_text: str, reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@example_request {"tag_name":"v1.0.0","target_commitish":"master","name":"v1.0.0","body":"Description of the release","draft":false,"prerelease":false}

@endpoint DELETE /repos/{owner}/{repo}/releases/{release_id}
@desc Delete a release
@required {owner: str, repo: str, release_id: int # release_id parameter}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/releases/{release_id}/assets
@desc List release assets
@required {owner: str, repo: str, release_id: int # release_id parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /repos/{owner}/{repo}/releases/{release_id}/assets
@desc Upload a release asset
@required {owner: str, repo: str, release_id: int # release_id parameter, name: str}
@optional {label: str}
@returns(201) {url: str(uri), browser_download_url: str(uri), id: int, node_id: str, name: str, label: str?, state: str, content_type: str, size: int, download_count: int, created_at: str(date-time), updated_at: str(date-time), uploader: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}} # Response for successful upload

@endpoint GET /repos/{owner}/{repo}/stargazers
@desc List stargazers
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint GET /repos/{owner}/{repo}/stats/code_frequency
@desc Get the weekly commit activity
@required {owner: str, repo: str}
@returns(200) Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
@returns(202) Accepted
@returns(204) A header with no content is returned.

@endpoint GET /repos/{owner}/{repo}/stats/commit_activity
@desc Get the last year of commit activity
@required {owner: str, repo: str}
@returns(200) Response
@returns(202) Accepted
@returns(204) A header with no content is returned.

@endpoint GET /repos/{owner}/{repo}/stats/contributors
@desc Get all contributor commit activity
@required {owner: str, repo: str}
@returns(200) *   `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). *   `a` - Number of additions *   `d` - Number of deletions *   `c` - Number of commits
@returns(202) Accepted
@returns(204) A header with no content is returned.

@endpoint GET /repos/{owner}/{repo}/stats/participation
@desc Get the weekly commit count
@required {owner: str, repo: str}
@returns(200) {all: [int], owner: [int]} # The array order is oldest week (index 0) to most recent week.
@errors {404: Resource not found}

@endpoint GET /repos/{owner}/{repo}/stats/punch_card
@desc Get the hourly commit count for each day
@required {owner: str, repo: str}
@returns(200) For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.
@returns(204) A header with no content is returned.

@endpoint POST /repos/{owner}/{repo}/statuses/{sha}
@desc Create a commit status
@required {owner: str, repo: str, sha: str, state: str(error/failure/pending/success) # The state of the status. Can be one of `error`, `failure`, `pending`, or `success`.}
@optional {target_url: str # The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.   For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:   `http://ci.example.com/user/repo/build/sha`, description: str # A short description of the status., context: str=default # A string label to differentiate this status from the status of other systems. This field is case-insensitive.}
@returns(201) {url: str, avatar_url: str?, id: int, node_id: str, state: str, description: str, target_url: str, context: str, created_at: str, updated_at: str, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}} # Response
@example_request {"state":"success","target_url":"https://example.com/build/status","description":"The build succeeded!","context":"continuous-integration/jenkins"}

@endpoint GET /repos/{owner}/{repo}/subscribers
@desc List watchers
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/subscription
@desc Get a repository subscription
@required {owner: str, repo: str}
@returns(200) {subscribed: bool, ignored: bool, reason: str?, created_at: str(date-time), url: str(uri), repository_url: str(uri)} # if you subscribe to the repository
@errors {403: Forbidden, 404: Not Found if you don't subscribe to the repository}

@endpoint PUT /repos/{owner}/{repo}/subscription
@desc Set a repository subscription
@required {owner: str, repo: str}
@optional {subscribed: bool # Determines if notifications should be received from this repository., ignored: bool # Determines if all notifications should be blocked from this repository.}
@returns(200) {subscribed: bool, ignored: bool, reason: str?, created_at: str(date-time), url: str(uri), repository_url: str(uri)} # Response

@endpoint DELETE /repos/{owner}/{repo}/subscription
@desc Delete a repository subscription
@required {owner: str, repo: str}
@returns(204) Response

@endpoint GET /repos/{owner}/{repo}/tags
@desc List repository tags
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/tarball/{ref}
@desc Download a repository archive (tar)
@required {owner: str, repo: str, ref: str}
@errors {302: Response}

@endpoint GET /repos/{owner}/{repo}/teams
@desc List repository teams
@required {owner: str, repo: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /repos/{owner}/{repo}/topics
@desc Get all repository topics
@required {owner: str, repo: str}
@optional {page: int=1 # Page number of the results to fetch., per_page: int=30 # Results per page (max 100)}
@returns(200) {names: [str]} # Response
@errors {404: Resource not found, 415: Preview header missing}

@endpoint PUT /repos/{owner}/{repo}/topics
@desc Replace all repository topics
@required {owner: str, repo: str, names: [str] # An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters.}
@returns(200) {names: [str]} # Response
@errors {404: Resource not found, 415: Preview header missing, 422: Validation failed}
@example_request {"names":["octocat","atom","electron","api"]}

@endpoint POST /repos/{owner}/{repo}/transfer
@desc Transfer a repository
@required {owner: str, repo: str, new_owner: str # The username or organization name the repository will be transferred to.}
@optional {team_ids: [int] # ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.}
@returns(202) {id: int, node_id: str, name: str, full_name: str, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str?, hooks_url: str(uri), svn_url: str, homepage: str?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, delete_branch_on_merge: bool, subscribers_count: int, network_count: int, code_of_conduct: map{key: str, name: str, url: str(uri), body: str, html_url: str(uri)?}, license: map?{key: str, name: str, spdx_id: str, url: str, node_id: str}, forks: int, open_issues: int, watchers: int, allow_forking: bool, anonymous_access_enabled: bool} # Response
@example_request {"new_owner":"github","team_ids":[12,345]}

@endpoint GET /repos/{owner}/{repo}/zipball/{ref}
@desc Download a repository archive (zip)
@required {owner: str, repo: str, ref: str}
@errors {302: Response}

@endpoint POST /repos/{template_owner}/{template_repo}/generate
@desc Create a repository using a template
@required {template_owner: str, template_repo: str, name: str # The name of the new repository.}
@optional {owner: str # The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization., description: str # A short description of the new repository., include_all_branches: bool=false # Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`., private: bool=false # Either `true` to create a new private repository or `false` to create a new public one.}
@returns(201) {id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool} # Response
@example_request {"owner":"octocat","name":"Hello-World","description":"This is your first repository","include_all_branches":false,"private":false}

@endgroup

@group repositories
@endpoint GET /repositories
@desc List public repositories
@optional {since: int # A repository ID. Only return repositories with an ID greater than this ID., visibility: str(all/public)=public # Specifies the types of repositories to return. Can be one of `all` or `public`. Default: `public`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise.}
@returns(200) Response
@errors {304: Not modified, 422: Validation failed}

@endgroup

@group search
@endpoint GET /search/code
@desc Search code
@required {q: str # The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@2.21/rest/reference/search#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers.}
@optional {sort: str # Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub Enterprise Server search infrastructure. Default: [best match](https://docs.github.com/enterprise-server@2.21/rest/reference/search#ranking-search-results), order: str(desc/asc)=desc # Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, incomplete_results: bool, items: [map]} # Response
@errors {304: Not modified, 403: Forbidden, 422: Validation failed, 503: Service unavailable}

@endpoint GET /search/commits
@desc Search commits
@required {q: str # The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@2.21/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers.}
@optional {sort: str(author-date/committer-date) # Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/enterprise-server@2.21/rest/reference/search#ranking-search-results), order: str(desc/asc)=desc # Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, incomplete_results: bool, items: [map]} # Response
@errors {304: Not modified, 415: Preview header missing}

@endpoint GET /search/issues
@desc Search issues and pull requests
@required {q: str # The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@2.21/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers.}
@optional {sort: str(comments/reactions/reactions-+1/reactions--1/reactions-smile/reactions-thinking_face/reactions-heart/reactions-tada/interactions/created/updated) # Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/enterprise-server@2.21/rest/reference/search#ranking-search-results), order: str(desc/asc)=desc # Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, incomplete_results: bool, items: [map]} # Response
@errors {304: Not modified, 403: Forbidden, 422: Validation failed, 503: Service unavailable}

@endpoint GET /search/labels
@desc Search labels
@required {repository_id: int # The id of the repository., q: str # The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@2.21/rest/reference/search#constructing-a-search-query).}
@optional {sort: str(created/updated) # Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/enterprise-server@2.21/rest/reference/search#ranking-search-results), order: str(desc/asc)=desc # Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, incomplete_results: bool, items: [map]} # Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint GET /search/repositories
@desc Search repositories
@required {q: str # The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@2.21/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers.}
@optional {sort: str(stars/forks/help-wanted-issues/updated) # Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/enterprise-server@2.21/rest/reference/search#ranking-search-results), order: str(desc/asc)=desc # Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, incomplete_results: bool, items: [map]} # Response
@errors {304: Not modified, 422: Validation failed, 503: Service unavailable}

@endpoint GET /search/topics
@desc Search topics
@required {q: str # The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@2.21/rest/reference/search#constructing-a-search-query).}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, incomplete_results: bool, items: [map]} # Response
@errors {304: Not modified, 415: Preview header missing}

@endpoint GET /search/users
@desc Search users
@required {q: str # The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@2.21/rest/reference/search#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers.}
@optional {sort: str(followers/repositories/joined) # Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub Enterprise Server. Default: [best match](https://docs.github.com/enterprise-server@2.21/rest/reference/search#ranking-search-results), order: str(desc/asc)=desc # Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, incomplete_results: bool, items: [map]} # Response
@errors {304: Not modified, 422: Validation failed, 503: Service unavailable}

@endgroup

@group setup
@endpoint GET /setup/api/configcheck
@desc Get the configuration status
@returns(200) {status: str, progress: [map]} # Response

@endpoint POST /setup/api/configure
@desc Start a configuration process
@returns(202) Response

@endpoint GET /setup/api/maintenance
@desc Get the maintenance status
@returns(200) {status: str, scheduled_time: str, connection_services: [map]} # Response

@endpoint POST /setup/api/maintenance
@desc Enable or disable maintenance mode
@returns(200) {status: str, scheduled_time: str, connection_services: [map]} # Response

@endpoint GET /setup/api/settings
@desc Get settings
@returns(200) {enterprise: map{private_mode: bool, public_pages: bool, subdomain_isolation: bool, signup_enabled: bool, github_hostname: str, identicons_host: str, http_proxy: str?, auth_mode: str, expire_sessions: bool, admin_password: str?, configuration_id: int, configuration_run_count: int, avatar: map{enabled: bool, uri: str}, customer: map{name: str, email: str, uuid: str, secret_key_data: str, public_key_data: str}, license: map{seats: int, evaluation: bool, perpetual: bool, unlimited_seating: bool, support_key: str, ssh_allowed: bool, cluster_support: bool, expire_at: str}, github_ssl: map{enabled: bool, cert: str?, key: str?}, ldap: map{host: str?, port: int, base: [any], uid: str?, bind_dn: str?, password: str?, method: str, search_strategy: str, user_groups: [any], admin_group: str?, virtual_attribute_enabled: bool, recursive_group_search: bool, posix_support: bool, user_sync_emails: bool, user_sync_keys: bool, user_sync_interval: int, team_sync_interval: int, sync_enabled: bool, reconciliation: map{user: str?, org: str?}, profile: map{uid: str, name: str?, mail: str?, key: str?}}, cas: map{url: str?}, saml: map{sso_url: str?, certificate: str?, certificate_path: str?, issuer: str?, idp_initiated_sso: bool, disable_admin_demote: bool}, github_oauth: map{client_id: str, client_secret: str, organization_name: str, organization_team: str}, smtp: map{enabled: bool, address: str, authentication: str, port: str, domain: str, username: str, user_name: str, enable_starttls_auto: bool, password: str, discard-to-noreply-address: bool, support_address: str, support_address_type: str, noreply_address: str}, ntp: map{primary_server: str, secondary_server: str}, timezone: str?, snmp: map{enabled: bool, community: str}, syslog: map{enabled: bool, server: str?, protocol_name: str}, assets: str?, pages: map{enabled: bool}, collectd: map{enabled: bool, server: str?, port: int, encryption: str?, username: str?, password: str?}, mapping: map{enabled: bool, tileserver: str?, basemap: str, token: str?}, load_balancer: str?}, run_list: [str]} # Response

@endpoint PUT /setup/api/settings
@desc Set settings
@returns(204) Response

@endpoint GET /setup/api/settings/authorized-keys
@desc Get all authorized SSH keys
@returns(200) Response

@endpoint POST /setup/api/settings/authorized-keys
@desc Add an authorized SSH key
@returns(201) Response

@endpoint DELETE /setup/api/settings/authorized-keys
@desc Remove an authorized SSH key
@returns(200) Response

@endpoint POST /setup/api/start
@desc Create a GitHub license
@returns(202) Response

@endpoint POST /setup/api/upgrade
@desc Upgrade a license
@returns(202) Response

@endgroup

@group teams
@endpoint GET /teams/{team_id}
@desc Get a team (Legacy)
@required {team_id: int}
@returns(200) {id: int, node_id: str, url: str(uri), html_url: str(uri), name: str, slug: str, description: str?, privacy: str, permission: str, members_url: str, repositories_url: str(uri), parent: map?{id: int, node_id: str, url: str(uri), members_url: str, name: str, description: str?, permission: str, privacy: str, html_url: str(uri), repositories_url: str(uri), slug: str, ldap_dn: str}, members_count: int, repos_count: int, created_at: str(date-time), updated_at: str(date-time), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?, name: str, company: str, blog: str(uri), location: str, email: str(email), has_organization_projects: bool, has_repository_projects: bool, public_repos: int, public_gists: int, followers: int, following: int, html_url: str(uri), created_at: str(date-time), type: str, total_private_repos: int, owned_private_repos: int, private_gists: int?, disk_usage: int?, collaborators: int?, billing_email: str(email)?, plan: map{name: str, space: int, private_repos: int, filled_seats: int, seats: int}, default_repository_permission: str?, members_can_create_repositories: bool?, two_factor_requirement_enabled: bool?, members_allowed_repository_creation_type: str, members_can_create_public_repositories: bool, members_can_create_private_repositories: bool, members_can_create_internal_repositories: bool, members_can_create_pages: bool, members_can_create_public_pages: bool, members_can_create_private_pages: bool, updated_at: str(date-time)}, ldap_dn: str} # Response
@errors {404: Resource not found}

@endpoint PATCH /teams/{team_id}
@desc Update a team (Legacy)
@required {team_id: int, name: str # The name of the team.}
@optional {description: str # The description of the team., privacy: str(secret/closed) # The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are:   **For a non-nested team:**   \* `secret` - only visible to organization owners and members of this team.   \* `closed` - visible to all members of this organization.   **For a parent or child team:**   \* `closed` - visible to all members of this organization., permission: str(pull/push/admin)=pull # **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:   \* `pull` - team members can pull, but not push to or administer newly-added repositories.   \* `push` - team members can pull and push, but not administer newly-added repositories.   \* `admin` - team members can pull, push and administer newly-added repositories., parent_team_id: int # The ID of a team to set as the parent team.}
@returns(200) {id: int, node_id: str, url: str(uri), html_url: str(uri), name: str, slug: str, description: str?, privacy: str, permission: str, members_url: str, repositories_url: str(uri), parent: map?{id: int, node_id: str, url: str(uri), members_url: str, name: str, description: str?, permission: str, privacy: str, html_url: str(uri), repositories_url: str(uri), slug: str, ldap_dn: str}, members_count: int, repos_count: int, created_at: str(date-time), updated_at: str(date-time), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?, name: str, company: str, blog: str(uri), location: str, email: str(email), has_organization_projects: bool, has_repository_projects: bool, public_repos: int, public_gists: int, followers: int, following: int, html_url: str(uri), created_at: str(date-time), type: str, total_private_repos: int, owned_private_repos: int, private_gists: int?, disk_usage: int?, collaborators: int?, billing_email: str(email)?, plan: map{name: str, space: int, private_repos: int, filled_seats: int, seats: int}, default_repository_permission: str?, members_can_create_repositories: bool?, two_factor_requirement_enabled: bool?, members_allowed_repository_creation_type: str, members_can_create_public_repositories: bool, members_can_create_private_repositories: bool, members_can_create_internal_repositories: bool, members_can_create_pages: bool, members_can_create_public_pages: bool, members_can_create_private_pages: bool, updated_at: str(date-time)}, ldap_dn: str} # Response
@returns(201) {id: int, node_id: str, url: str(uri), html_url: str(uri), name: str, slug: str, description: str?, privacy: str, permission: str, members_url: str, repositories_url: str(uri), parent: map?{id: int, node_id: str, url: str(uri), members_url: str, name: str, description: str?, permission: str, privacy: str, html_url: str(uri), repositories_url: str(uri), slug: str, ldap_dn: str}, members_count: int, repos_count: int, created_at: str(date-time), updated_at: str(date-time), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?, name: str, company: str, blog: str(uri), location: str, email: str(email), has_organization_projects: bool, has_repository_projects: bool, public_repos: int, public_gists: int, followers: int, following: int, html_url: str(uri), created_at: str(date-time), type: str, total_private_repos: int, owned_private_repos: int, private_gists: int?, disk_usage: int?, collaborators: int?, billing_email: str(email)?, plan: map{name: str, space: int, private_repos: int, filled_seats: int, seats: int}, default_repository_permission: str?, members_can_create_repositories: bool?, two_factor_requirement_enabled: bool?, members_allowed_repository_creation_type: str, members_can_create_public_repositories: bool, members_can_create_private_repositories: bool, members_can_create_internal_repositories: bool, members_can_create_pages: bool, members_can_create_public_pages: bool, members_can_create_private_pages: bool, updated_at: str(date-time)}, ldap_dn: str} # Response
@errors {403: Forbidden, 404: Resource not found, 422: Validation failed}
@example_request {"name":"new team name","description":"new team description","privacy":"closed"}

@endpoint DELETE /teams/{team_id}
@desc Delete a team (Legacy)
@required {team_id: int}
@returns(204) Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint GET /teams/{team_id}/discussions
@desc List discussions (Legacy)
@required {team_id: int}
@optional {direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /teams/{team_id}/discussions
@desc Create a discussion (Legacy)
@required {team_id: int, title: str # The discussion post's title., body: str # The discussion post's body text.}
@optional {private: bool=false # Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post.}
@returns(201) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, comments_count: int, comments_url: str(uri), created_at: str(date-time), last_edited_at: str(date-time)?, html_url: str(uri), node_id: str, number: int, pinned: bool, private: bool, team_url: str(uri), title: str, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@example_request {"title":"Our first team post","body":"Hi! This is an area for us to collaborate as a team."}

@endpoint GET /teams/{team_id}/discussions/{discussion_number}
@desc Get a discussion (Legacy)
@required {team_id: int, discussion_number: int}
@returns(200) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, comments_count: int, comments_url: str(uri), created_at: str(date-time), last_edited_at: str(date-time)?, html_url: str(uri), node_id: str, number: int, pinned: bool, private: bool, team_url: str(uri), title: str, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response

@endpoint PATCH /teams/{team_id}/discussions/{discussion_number}
@desc Update a discussion (Legacy)
@required {team_id: int, discussion_number: int}
@optional {title: str # The discussion post's title., body: str # The discussion post's body text.}
@returns(200) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, comments_count: int, comments_url: str(uri), created_at: str(date-time), last_edited_at: str(date-time)?, html_url: str(uri), node_id: str, number: int, pinned: bool, private: bool, team_url: str(uri), title: str, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@example_request {"title":"Welcome to our first team post"}

@endpoint DELETE /teams/{team_id}/discussions/{discussion_number}
@desc Delete a discussion (Legacy)
@required {team_id: int, discussion_number: int}
@returns(204) Response

@endpoint GET /teams/{team_id}/discussions/{discussion_number}/comments
@desc List discussion comments (Legacy)
@required {team_id: int, discussion_number: int}
@optional {direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /teams/{team_id}/discussions/{discussion_number}/comments
@desc Create a discussion comment (Legacy)
@required {team_id: int, discussion_number: int, body: str # The discussion comment's body text.}
@returns(201) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, created_at: str(date-time), last_edited_at: str(date-time)?, discussion_url: str(uri), html_url: str(uri), node_id: str, number: int, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@example_request {"body":"Do you like apples?"}

@endpoint GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}
@desc Get a discussion comment (Legacy)
@required {team_id: int, discussion_number: int, comment_number: int}
@returns(200) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, created_at: str(date-time), last_edited_at: str(date-time)?, discussion_url: str(uri), html_url: str(uri), node_id: str, number: int, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response

@endpoint PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}
@desc Update a discussion comment (Legacy)
@required {team_id: int, discussion_number: int, comment_number: int, body: str # The discussion comment's body text.}
@returns(200) {author: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, body: str, body_html: str, body_version: str, created_at: str(date-time), last_edited_at: str(date-time)?, discussion_url: str(uri), html_url: str(uri), node_id: str, number: int, updated_at: str(date-time), url: str(uri), reactions: map{url: str(uri), total_count: int, +1: int, -1: int, laugh: int, confused: int, heart: int, hooray: int, eyes: int, rocket: int}} # Response
@example_request {"body":"Do you like pineapples?"}

@endpoint DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}
@desc Delete a discussion comment (Legacy)
@required {team_id: int, discussion_number: int, comment_number: int}
@returns(204) Response

@endpoint GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions
@desc List reactions for a team discussion comment (Legacy)
@required {team_id: int, discussion_number: int, comment_number: int}
@optional {content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # Returns a single [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions
@desc Create reaction for a team discussion comment (Legacy)
@required {team_id: int, discussion_number: int, comment_number: int, content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # The [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types) to add to the team discussion comment.}
@returns(201) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Response
@example_request {"content":"heart"}

@endpoint GET /teams/{team_id}/discussions/{discussion_number}/reactions
@desc List reactions for a team discussion (Legacy)
@required {team_id: int, discussion_number: int}
@optional {content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # Returns a single [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint POST /teams/{team_id}/discussions/{discussion_number}/reactions
@desc Create reaction for a team discussion (Legacy)
@required {team_id: int, discussion_number: int, content: str(+1/-1/laugh/confused/heart/hooray/rocket/eyes) # The [reaction type](https://docs.github.com/enterprise-server@2.21/rest/reference/reactions#reaction-types) to add to the team discussion.}
@returns(201) {id: int, node_id: str, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, content: str, created_at: str(date-time)} # Response
@example_request {"content":"heart"}

@endpoint GET /teams/{team_id}/members
@desc List team members (Legacy)
@required {team_id: int}
@optional {role: str(member/maintainer/all)=all # Filters members returned by their role in the team. Can be one of:   \* `member` - normal members of the team.   \* `maintainer` - team maintainers.   \* `all` - all members of the team., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint GET /teams/{team_id}/members/{username}
@desc Get team member (Legacy)
@required {team_id: int, username: str}
@returns(204) if user is a member
@errors {404: if user is not a member}

@endpoint PUT /teams/{team_id}/members/{username}
@desc Add team member (Legacy)
@required {team_id: int, username: str}
@returns(204) Response
@errors {403: Forbidden, 404: Not Found if team synchronization is set up, 422: Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization}

@endpoint DELETE /teams/{team_id}/members/{username}
@desc Remove team member (Legacy)
@required {team_id: int, username: str}
@returns(204) Response
@errors {404: Not Found if team synchronization is setup}

@endpoint GET /teams/{team_id}/memberships/{username}
@desc Get team membership for a user (Legacy)
@required {team_id: int, username: str}
@returns(200) {url: str(uri), role: str, state: str} # Response
@errors {404: Resource not found}

@endpoint PUT /teams/{team_id}/memberships/{username}
@desc Add or update team membership for a user (Legacy)
@required {team_id: int, username: str}
@optional {role: str(member/maintainer)=member # The role that this user should have in the team. Can be one of:   \* `member` - a normal member of the team.   \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.}
@returns(200) {url: str(uri), role: str, state: str} # Response
@errors {403: Forbidden if team synchronization is set up, 404: Resource not found, 422: Unprocessable Entity if you attempt to add an organization to a team}

@endpoint DELETE /teams/{team_id}/memberships/{username}
@desc Remove team membership for a user (Legacy)
@required {team_id: int, username: str}
@returns(204) Response
@errors {403: if team synchronization is set up}

@endpoint GET /teams/{team_id}/projects
@desc List team projects (Legacy)
@required {team_id: int}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found, 415: Preview header missing}

@endpoint GET /teams/{team_id}/projects/{project_id}
@desc Check team permissions for a project (Legacy)
@required {team_id: int, project_id: int}
@returns(200) {owner_url: str, url: str, html_url: str, columns_url: str, id: int, node_id: str, name: str, body: str?, number: int, state: str, creator: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str, updated_at: str, organization_permission: str, private: bool, permissions: map{read: bool, write: bool, admin: bool}} # Response
@errors {404: Not Found if project is not managed by this team, 415: Preview header missing}

@endpoint PUT /teams/{team_id}/projects/{project_id}
@desc Add or update team project permissions (Legacy)
@required {team_id: int, project_id: int}
@optional {permission: str(read/write/admin) # The permission to grant to the team for this project. Can be one of:   \* `read` - team members can read, but not write to or administer this project.   \* `write` - team members can read and write, but not administer this project.   \* `admin` - team members can read, write and administer this project.   Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. 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](https://docs.github.com/enterprise-server@2.21/rest/overview/resources-in-the-rest-api#http-verbs)."}
@returns(204) Response
@errors {403: Forbidden if the project is not owned by the organization, 404: Resource not found, 415: Preview header missing, 422: Validation failed}

@endpoint DELETE /teams/{team_id}/projects/{project_id}
@desc Remove a project from a team (Legacy)
@required {team_id: int, project_id: int}
@returns(204) Response
@errors {404: Resource not found, 415: Preview header missing, 422: Validation failed}

@endpoint GET /teams/{team_id}/repos
@desc List team repositories (Legacy)
@required {team_id: int}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {404: Resource not found}

@endpoint GET /teams/{team_id}/repos/{owner}/{repo}
@desc Check team permissions for a repository (Legacy)
@required {team_id: int, owner: str, repo: str}
@returns(200) {id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, anonymous_access_enabled: bool} # Alternative response with extra repository information
@returns(204) Response if repository is managed by this team
@errors {404: Not Found if repository is not managed by this team}

@endpoint PUT /teams/{team_id}/repos/{owner}/{repo}
@desc Add or update team repository permissions (Legacy)
@required {team_id: int, owner: str, repo: str}
@optional {permission: str(pull/push/admin) # The permission to grant the team on this repository. Can be one of:   \* `pull` - team members can pull, but not push to or administer this repository.   \* `push` - team members can pull and push, but not administer this repository.   \* `admin` - team members can pull, push and administer this repository.      If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository.}
@returns(204) Response
@errors {403: Forbidden, 422: Validation failed}

@endpoint DELETE /teams/{team_id}/repos/{owner}/{repo}
@desc Remove a repository from a team (Legacy)
@required {team_id: int, owner: str, repo: str}
@returns(204) Response

@endpoint GET /teams/{team_id}/teams
@desc List child teams (Legacy)
@required {team_id: int}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) if child teams exist
@errors {403: Forbidden, 404: Resource not found, 422: Validation failed}

@endgroup

@group user
@endpoint GET /user
@desc Get the authenticated user
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint PATCH /user
@desc Update the authenticated user
@optional {name: str # The new name of the user., email: str # The publicly visible email address of the user., blog: str # The new blog URL of the user., twitter_username: str # The new Twitter username of the user., company: str # The new company of the user., location: str # The new location of the user., hireable: bool # The new hiring availability of the user., bio: str # The new short biography of the user.}
@returns(200) {login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, name: str?, company: str?, blog: str?, location: str?, email: str(email)?, hireable: bool?, bio: str?, public_repos: int, public_gists: int, followers: int, following: int, created_at: str(date-time), updated_at: str(date-time), private_gists: int, total_private_repos: int, owned_private_repos: int, disk_usage: int, collaborators: int, two_factor_authentication: bool, plan: map{collaborators: int, name: str, space: int, private_repos: int}, suspended_at: str(date-time)?, business_plus: bool, ldap_dn: str} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint GET /user/emails
@desc List email addresses for the authenticated user
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint POST /user/emails
@desc Add an email address for the authenticated user
@returns(201) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint DELETE /user/emails
@desc Delete an email address for the authenticated user
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint GET /user/followers
@desc List followers of the authenticated user
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint GET /user/following
@desc List the people the authenticated user follows
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint GET /user/following/{username}
@desc Check if a person is followed by the authenticated user
@required {username: str}
@returns(204) if the person is followed by the authenticated user
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: if the person is not followed by the authenticated user}

@endpoint PUT /user/following/{username}
@desc Follow a user
@required {username: str}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint DELETE /user/following/{username}
@desc Unfollow a user
@required {username: str}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint GET /user/gpg_keys
@desc List GPG keys for the authenticated user
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint POST /user/gpg_keys
@desc Create a GPG key for the authenticated user
@required {armored_public_key: str # A GPG key in ASCII-armored format.}
@returns(201) {id: int, primary_key_id: int?, key_id: str, public_key: str, emails: [map], subkeys: [map], can_sign: bool, can_encrypt_comms: bool, can_encrypt_storage: bool, can_certify: bool, created_at: str(date-time), expires_at: str(date-time)?, raw_key: str?} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint GET /user/gpg_keys/{gpg_key_id}
@desc Get a GPG key for the authenticated user
@required {gpg_key_id: int # gpg_key_id parameter}
@returns(200) {id: int, primary_key_id: int?, key_id: str, public_key: str, emails: [map], subkeys: [map], can_sign: bool, can_encrypt_comms: bool, can_encrypt_storage: bool, can_certify: bool, created_at: str(date-time), expires_at: str(date-time)?, raw_key: str?} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint DELETE /user/gpg_keys/{gpg_key_id}
@desc Delete a GPG key for the authenticated user
@required {gpg_key_id: int # gpg_key_id parameter}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint GET /user/installations
@desc List app installations accessible to the user access token
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change.}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, installations: [map]} # You can find the permissions for the installation under the `permissions` key.
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 415: Preview header missing}

@endpoint GET /user/installations/{installation_id}/repositories
@desc List repositories accessible to the user access token
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change., installation_id: int # installation_id parameter}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) {total_count: int, repository_selection: str, repositories: [map]} # The access the user has to each repository is included in the hash under the `permissions` key.
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint PUT /user/installations/{installation_id}/repositories/{repository_id}
@desc Add a repository to an app installation
@required {installation_id: int # installation_id parameter, repository_id: int}
@returns(204) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint DELETE /user/installations/{installation_id}/repositories/{repository_id}
@desc Remove a repository from an app installation
@required {installation_id: int # installation_id parameter, repository_id: int}
@returns(204) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endpoint GET /user/issues
@desc List user account issues assigned to the authenticated user
@optional {filter: str(assigned/created/mentioned/subscribed/repos/all)=assigned # Indicates which sorts of issues to return. Can be one of:   \* `assigned`: Issues assigned to you   \* `created`: Issues created by you   \* `mentioned`: Issues mentioning you   \* `subscribed`: Issues you're subscribed to updates for   \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation, state: str(open/closed/all)=open # Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`., labels: str # A list of comma separated label names. Example: `bug,ui,@high`, sort: str(created/updated/comments)=created # What to sort results by. Can be either `created`, `updated`, `comments`., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 404: Resource not found}

@endpoint GET /user/keys
@desc List public SSH keys for the authenticated user
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint POST /user/keys
@desc Create a public SSH key for the authenticated user
@required {key: str # The public SSH key to add to your GitHub account.}
@optional {title: str # A descriptive name for the new key.}
@returns(201) {key: str, id: int, url: str, title: str, created_at: str(date-time), verified: bool, read_only: bool} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint GET /user/keys/{key_id}
@desc Get a public SSH key for the authenticated user
@required {key_id: int # key_id parameter}
@returns(200) {key: str, id: int, url: str, title: str, created_at: str(date-time), verified: bool, read_only: bool} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint DELETE /user/keys/{key_id}
@desc Delete a public SSH key for the authenticated user
@required {key_id: int # key_id parameter}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint GET /user/memberships/orgs
@desc List organization memberships for the authenticated user
@optional {state: str(active/pending) # Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 422: Validation failed}

@endpoint GET /user/memberships/orgs/{org}
@desc Get an organization membership for the authenticated user
@required {org: str}
@returns(200) {url: str(uri), state: str, role: str, organization_url: str(uri), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?}, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, permissions: map{can_create_repository: bool}} # Response
@errors {403: Forbidden, 404: Resource not found}

@endpoint PATCH /user/memberships/orgs/{org}
@desc Update an organization membership for the authenticated user
@required {org: str, state: str # The state that the membership should be in. Only `"active"` will be accepted.}
@returns(200) {url: str(uri), state: str, role: str, organization_url: str(uri), organization: map{login: str, id: int, node_id: str, url: str(uri), repos_url: str(uri), events_url: str(uri), hooks_url: str, issues_url: str, members_url: str, public_members_url: str, avatar_url: str, description: str?}, user: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, permissions: map{can_create_repository: bool}} # Response
@errors {403: Forbidden, 404: Resource not found, 422: Validation failed}
@example_request {"state":"active"}

@endpoint GET /user/orgs
@desc List organizations for the authenticated user
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint POST /user/projects
@desc Create a user project
@required {name: str # Name of the project}
@optional {body: str # Body of the project}
@returns(201) {owner_url: str(uri), url: str(uri), html_url: str(uri), columns_url: str(uri), id: int, node_id: str, name: str, body: str?, number: int, state: str, creator: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, created_at: str(date-time), updated_at: str(date-time), organization_permission: str, private: bool} # Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 415: Preview header missing, 422: Validation failed}

@endpoint GET /user/public_emails
@desc List public email addresses for the authenticated user
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint GET /user/repos
@desc List repositories for the authenticated user
@optional {visibility: str(all/public/private)=all # Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`., affiliation: str=owner,collaborator,organization_member # Comma-separated list of values. Can include:   \* `owner`: Repositories that are owned by the authenticated user.   \* `collaborator`: Repositories that the user has been added to as a collaborator.   \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on., type: str(all/owner/public/private/member)=all # Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all`      Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**., sort: str(created/updated/pushed/full_name)=full_name # Can be one of `created`, `updated`, `pushed`, `full_name`., direction: str(asc/desc) # Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc`, per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch., since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., before: str(date-time) # Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 422: Validation failed}

@endpoint POST /user/repos
@desc Create a repository for the authenticated user
@required {name: str # The name of the repository.}
@optional {description: str # A short description of the repository., homepage: str # A URL with more information about the repository., private: bool=false # Whether the repository is private., has_issues: bool=true # Whether issues are enabled., has_projects: bool=true # Whether projects are enabled., has_wiki: bool=true # Whether the wiki is enabled., team_id: int # The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization., auto_init: bool=false # Whether the repository is initialized with a minimal README., gitignore_template: str # The desired language or platform to apply to the .gitignore., license_template: str # The license keyword of the open source license for this repository., allow_squash_merge: bool=true # Whether to allow squash merges for pull requests., allow_merge_commit: bool=true # Whether to allow merge commits for pull requests., allow_rebase_merge: bool=true # Whether to allow rebase merges for pull requests., delete_branch_on_merge: bool=false # Whether to delete head branches when pull requests are merged, has_downloads: bool=true # Whether downloads are enabled., is_template: bool=false # Whether this repository acts as a template that can be used to generate new repositories.}
@returns(201) {id: int, node_id: str, name: str, full_name: str, license: map?{key: str, name: str, url: str(uri)?, spdx_id: str?, node_id: str, html_url: str(uri)}, organization: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, forks: int, permissions: map{admin: bool, pull: bool, triage: bool, push: bool, maintain: bool}, owner: map{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, private: bool, html_url: str(uri), description: str?, fork: bool, url: str(uri), archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str(uri), deployments_url: str(uri), downloads_url: str(uri), events_url: str(uri), forks_url: str(uri), git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str(uri), merges_url: str(uri), milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str(uri), statuses_url: str, subscribers_url: str(uri), subscription_url: str(uri), tags_url: str(uri), teams_url: str(uri), trees_url: str, clone_url: str, mirror_url: str(uri)?, hooks_url: str(uri), svn_url: str(uri), homepage: str(uri)?, language: str?, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str(date-time)?, created_at: str(date-time)?, updated_at: str(date-time)?, allow_rebase_merge: bool, template_repository: map?{id: int, node_id: str, name: str, full_name: str, owner: map{login: str, id: int, node_id: str, avatar_url: str, gravatar_id: str, url: str, html_url: str, followers_url: str, following_url: str, gists_url: str, starred_url: str, subscriptions_url: str, organizations_url: str, repos_url: str, events_url: str, received_events_url: str, type: str, site_admin: bool}, private: bool, html_url: str, description: str, fork: bool, url: str, archive_url: str, assignees_url: str, blobs_url: str, branches_url: str, collaborators_url: str, comments_url: str, commits_url: str, compare_url: str, contents_url: str, contributors_url: str, deployments_url: str, downloads_url: str, events_url: str, forks_url: str, git_commits_url: str, git_refs_url: str, git_tags_url: str, git_url: str, issue_comment_url: str, issue_events_url: str, issues_url: str, keys_url: str, labels_url: str, languages_url: str, merges_url: str, milestones_url: str, notifications_url: str, pulls_url: str, releases_url: str, ssh_url: str, stargazers_url: str, statuses_url: str, subscribers_url: str, subscription_url: str, tags_url: str, teams_url: str, trees_url: str, clone_url: str, mirror_url: str, hooks_url: str, svn_url: str, homepage: str, language: str, forks_count: int, stargazers_count: int, watchers_count: int, size: int, default_branch: str, open_issues_count: int, is_template: bool, topics: [str], has_issues: bool, has_projects: bool, has_wiki: bool, has_pages: bool, has_downloads: bool, archived: bool, disabled: bool, visibility: str, pushed_at: str, created_at: str, updated_at: str, permissions: map{admin: bool, maintain: bool, push: bool, triage: bool, pull: bool}, allow_rebase_merge: bool, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, subscribers_count: int, network_count: int, anonymous_access_enabled: bool}, allow_squash_merge: bool, delete_branch_on_merge: bool, allow_merge_commit: bool, allow_forking: bool, subscribers_count: int, network_count: int, open_issues: int, watchers: int, master_branch: str, starred_at: str, anonymous_access_enabled: bool} # Response
@errors {304: Not modified, 400: Bad Request, 401: Requires authentication, 403: Forbidden, 404: Resource not found, 422: Validation failed}

@endpoint GET /user/repository_invitations
@desc List repository invitations for the authenticated user
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint PATCH /user/repository_invitations/{invitation_id}
@desc Accept a repository invitation
@required {invitation_id: int # invitation_id parameter}
@returns(204) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found, 409: Conflict}

@endpoint DELETE /user/repository_invitations/{invitation_id}
@desc Decline a repository invitation
@required {invitation_id: int # invitation_id parameter}
@returns(204) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found, 409: Conflict}

@endpoint GET /user/starred
@desc List repositories starred by the authenticated user
@optional {sort: str(created/updated)=created # One of `created` (when the repository was starred) or `updated` (when it was last pushed to)., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint GET /user/starred/{owner}/{repo}
@desc Check if a repository is starred by the authenticated user
@required {owner: str, repo: str}
@returns(204) Response if this repository is starred by you
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Not Found if this repository is not starred by you}

@endpoint PUT /user/starred/{owner}/{repo}
@desc Star a repository for the authenticated user
@required {owner: str, repo: str}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint DELETE /user/starred/{owner}/{repo}
@desc Unstar a repository for the authenticated user
@required {owner: str, repo: str}
@returns(204) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden, 404: Resource not found}

@endpoint GET /user/subscriptions
@desc List repositories watched by the authenticated user
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 401: Requires authentication, 403: Forbidden}

@endpoint GET /user/teams
@desc List teams for the authenticated user
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {304: Not modified, 403: Forbidden, 404: Resource not found}

@endgroup

@group users
@endpoint GET /users
@desc List users
@optional {since: int # A user ID. Only return users with an ID greater than this ID., per_page: int=30 # Results per page (max 100)}
@returns(200) Response
@errors {304: Not modified}

@endpoint GET /users/{username}
@desc Get a user
@required {username: str}
@returns(200) Response
@returns(202) Accepted
@errors {404: Resource not found}

@endpoint GET /users/{username}/events
@desc List events for the authenticated user
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/events/orgs/{org}
@desc List organization events for the authenticated user
@required {username: str, org: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/events/public
@desc List public events for a user
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/followers
@desc List followers of a user
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/following
@desc List the people a user follows
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/following/{target_user}
@desc Check if a user follows another user
@required {username: str, target_user: str}
@returns(204) if the user follows the target user
@errors {404: if the user does not follow the target user}

@endpoint GET /users/{username}/gists
@desc List gists for a user
@required {username: str}
@optional {since: str(date-time) # Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {422: Validation failed}

@endpoint GET /users/{username}/gpg_keys
@desc List GPG keys for a user
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/hovercard
@desc Get contextual information for a user
@required {username: str}
@optional {subject_type: str(organization/repository/issue/pull_request) # Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`., subject_id: str # Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`.}
@returns(200) {contexts: [map]} # Response
@errors {404: Resource not found, 422: Validation failed}

@endpoint GET /users/{username}/installation
@desc Get a user installation for the authenticated app
@required {accept: str=application/vnd.github.machine-man-preview+json # This API is under preview and subject to change., username: str}
@returns(200) {id: int, account: any?, repository_selection: str, access_tokens_url: str(uri), repositories_url: str(uri), html_url: str(uri), app_id: int, target_id: int, target_type: str, permissions: map{deployments: str, checks: str, metadata: str, contents: str, pull_requests: str, statuses: str, issues: str, organization_administration: str}, events: [str], created_at: str(date-time), updated_at: str(date-time), single_file_name: str?, app_slug: str, suspended_by: map?{name: str?, email: str?, login: str, id: int, node_id: str, avatar_url: str(uri), gravatar_id: str?, url: str(uri), html_url: str(uri), followers_url: str(uri), following_url: str, gists_url: str, starred_url: str, subscriptions_url: str(uri), organizations_url: str(uri), repos_url: str(uri), events_url: str, received_events_url: str(uri), type: str, site_admin: bool, starred_at: str}, suspended_at: str(date-time)?, contact_email: str?} # Response

@endpoint GET /users/{username}/keys
@desc List public keys for a user
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/orgs
@desc List organizations for a user
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/projects
@desc List user projects
@required {username: str}
@optional {state: str(open/closed/all)=open # Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response
@errors {415: Preview header missing, 422: Validation failed}

@endpoint GET /users/{username}/received_events
@desc List events received by the authenticated user
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/received_events/public
@desc List public events received by a user
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/repos
@desc List repositories for a user
@required {username: str}
@optional {type: str(all/owner/member)=owner # Can be one of `all`, `owner`, `member`., sort: str(created/updated/pushed/full_name)=full_name # Can be one of `created`, `updated`, `pushed`, `full_name`., direction: str(asc/desc) # Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc`, per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint PUT /users/{username}/site_admin
@desc Promote a user to be a site administrator
@required {username: str}
@returns(204) Response

@endpoint DELETE /users/{username}/site_admin
@desc Demote a site administrator
@required {username: str}
@returns(204) Response

@endpoint GET /users/{username}/starred
@desc List repositories starred by a user
@required {username: str}
@optional {sort: str(created/updated)=created # One of `created` (when the repository was starred) or `updated` (when it was last pushed to)., direction: str(asc/desc)=desc # One of `asc` (ascending) or `desc` (descending)., per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint GET /users/{username}/subscriptions
@desc List repositories watched by a user
@required {username: str}
@optional {per_page: int=30 # Results per page (max 100), page: int=1 # Page number of the results to fetch.}
@returns(200) Response

@endpoint PUT /users/{username}/suspended
@desc Suspend a user
@required {username: str}
@optional {reason: str # The reason the user is being suspended. This message will be logged in the [audit log](https://help.github.com/enterprise/admin/articles/audit-logging/). If you don't provide a `reason`, it will default to "Suspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action.}
@returns(204) Response

@endpoint DELETE /users/{username}/suspended
@desc Unsuspend a user
@required {username: str}
@optional {reason: str # The reason the user is being unsuspended. This message will be logged in the [audit log](https://help.github.com/enterprise/admin/articles/audit-logging/). If you don't provide a `reason`, it will default to "Unsuspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action.}
@returns(204) Response

@endgroup

@group zen
@endpoint GET /zen
@desc Get the Zen of GitHub
@returns(200) Response

@endgroup

@end
