@datafire/github
Client library for GitHub v3 REST API
Installation and Usage
npm install --save @datafire/github
let github = require('@datafire/github').create();
.then(data => {
console.log(data);
});
Description
GitHub's v3 REST API.
Actions
.get
Get Hypermedia links to resources accessible in GitHub's REST API
github..get(null, context)
Input
This action has no parameters
Output
- output
object
- authorizations_url required
string
- code_search_url required
string
- commit_search_url required
string
- current_user_authorizations_html_url required
string
- current_user_repositories_url required
string
- current_user_url required
string
- emails_url required
string
- emojis_url required
string
- events_url required
string
- feeds_url required
string
- followers_url required
string
- following_url required
string
- gists_url required
string
- hub_url required
string
- issue_search_url required
string
- issues_url required
string
- keys_url required
string
- label_search_url required
string
- notifications_url required
string
- organization_repositories_url required
string
- organization_teams_url required
string
- organization_url required
string
- public_gists_url required
string
- rate_limit_url required
string
- repository_search_url required
string
- repository_url required
string
- starred_gists_url required
string
- starred_url required
string
- topic_search_url
string
- user_organizations_url required
string
- user_repositories_url required
string
- user_search_url required
string
- user_url required
string
- authorizations_url required
app.get
Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the installations_count
in the response. For more details about your app's installations, see the "List installations for the authenticated app" endpoint.
You must use a JWT to access this endpoint.
github.app.get(null, context)
Input
This action has no parameters
Output
- output integration
app_manifests.code.conversions.post
Use this endpoint to complete the handshake necessary when implementing the GitHub App Manifest flow. When you create a GitHub App with the manifest flow, you receive a temporary code
used to retrieve the GitHub App's id
, pem
(private key), and webhook_secret
.
github.app_manifests.code.conversions.post({
"code": ""
}, context)
Input
- input
object
- code required
string
: code parameter
- code required
Output
- output
- client_id
string
- client_secret
string
- created_at required
string
- description required
string
- events required
array
: The list of events for the GitHub app- items
string
- items
- external_url required
string
- html_url required
string
- id required
integer
: Unique identifier of the GitHub app - installations_count
integer
: The number of installations associated with the GitHub app - name required
string
: The name of the GitHub app - node_id required
string
- owner required
- avatar_url required
string
- events_url required
string
- followers_url required
string
- following_url required
string
- gists_url required
string
- gravatar_id required
string
- html_url required
string
- id required
integer
- login required
string
- node_id required
string
- organizations_url required
string
- received_events_url required
string
- repos_url required
string
- site_admin required
boolean
- starred_at
string
- starred_url required
string
- subscriptions_url required
string
- type required
string
- url required
string
- avatar_url required
- pem
string
- permissions required
object
: The set of permissions for the GitHub app- checks
string
- contents
string
- deployments
string
- issues
string
- metadata
string
- checks
- slug
string
: The slug name of the GitHub app - updated_at required
string
- webhook_secret
string
- client_id required
string
- client_secret required
string
- pem required
string
- webhook_secret required
string
- client_id
app.installations.get
You must use a JWT to access this endpoint.
The permissions the installation has are included under the permissions
key.
github.app.installations.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch. - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - outdated
string
- per_page
Output
- output
array
- items installation
app.installations.installation_id.delete
Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "Suspend an app installation" endpoint.
You must use a JWT to access this endpoint.
github.app.installations.installation_id.delete({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter
- installation_id required
Output
Output schema unknown
app.installations.installation_id.get
Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (target_type
) will be either an organization or a user account, depending which account the repository belongs to.
You must use a JWT to access this endpoint.
github.app.installations.installation_id.get({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter
- installation_id required
Output
- output installation
app.installations.installation_id.access_tokens.post
Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of 401 - Unauthorized
, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the repository_ids
when creating the token. When you omit repository_ids
, the response does not contain the repositories
key.
You must use a JWT to access this endpoint.
github.app.installations.installation_id.access_tokens.post({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter - body
object
- permissions
object
- contents
string
- def_not_a_repo
string
- deployments
string
- issues
string
- single_file
string
- contents
- repositories
array
: List of repository names that the token should have access to- items
string
- items
- repository_ids
array
: List of repository IDs that the token should have access to- items
integer
- items
- permissions
- installation_id required
Output
- output installation-token
app.installations.installation_id.suspended.delete
Note: Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "Suspending a GitHub App installation."
Removes a GitHub App installation suspension.
To unsuspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed and suspended.
You must use a JWT to access this endpoint.
github.app.installations.installation_id.suspended.delete({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter
- installation_id required
Output
Output schema unknown
app.installations.installation_id.suspended.put
Note: Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "Suspending a GitHub App installation."
Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.
To suspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed.
You must use a JWT to access this endpoint.
github.app.installations.installation_id.suspended.put({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter
- installation_id required
Output
Output schema unknown
applications.grants.get
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the list your authorizations API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on the application authorizations settings screen within GitHub. The scopes
returned are the union of scopes authorized for the application. For example, if an application has one token with repo
scope and another token with user
scope, the grant will return ["repo", "user"]
.
github.applications.grants.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items application-grant
applications.grants.grant_id.delete
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on the application authorizations settings screen within GitHub.
github.applications.grants.grant_id.delete({
"grant_id": 0
}, context)
Input
- input
object
- grant_id required
integer
: grant_id parameter
- grant_id required
Output
Output schema unknown
applications.grants.grant_id.get
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
github.applications.grants.grant_id.get({
"grant_id": 0
}, context)
Input
- input
object
- grant_id required
integer
: grant_id parameter
- grant_id required
Output
- output application-grant
applications.client_id.grant.delete
OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id
and client_secret
as the username and password. You must also provide a valid OAuth access_token
as an input parameter and the grant for the token's owner will be deleted.
Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on the application authorizations settings screen within GitHub.
github.applications.client_id.grant.delete({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- access_token
string
: The OAuth access token used to authenticate to the GitHub API.
- access_token
- client_id required
Output
Output schema unknown
applications.client_id.grants.access_token.delete
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containing access_token
in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using access_token
as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the blog post.
OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id
and client_secret
as the username and password. You must also provide a valid token as :access_token
and the grant for the token's owner will be deleted.
Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on the Applications settings page under "Authorized OAuth Apps" on GitHub.
github.applications.client_id.grants.access_token.delete({
"client_id": "",
"access_token": ""
}, context)
Input
- input
object
- client_id required
string
- access_token required
string
- client_id required
Output
Output schema unknown
applications.client_id.token.delete
OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id
and client_secret
as the username and password.
github.applications.client_id.token.delete({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- access_token
string
: The OAuth access token used to authenticate to the GitHub API.
- access_token
- client_id required
Output
Output schema unknown
applications.client_id.token.patch
OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id
and client_secret
as the username and password. Invalid tokens will return 404 NOT FOUND
.
github.applications.client_id.token.patch({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- access_token required
string
: The access_token of the OAuth application.
- access_token required
- client_id required
Output
- output authorization
applications.client_id.token.post
OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use Basic Authentication to use this endpoint, where the username is the OAuth application client_id
and the password is its client_secret
. Invalid tokens will return 404 NOT FOUND
.
github.applications.client_id.token.post({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- access_token required
string
: The access_token of the OAuth application.
- access_token required
- client_id required
Output
- output authorization
applications.client_id.tokens.access_token.delete
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containing access_token
in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using access_token
as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the blog post.
OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id
and client_secret
as the username and password.
github.applications.client_id.tokens.access_token.delete({
"client_id": "",
"access_token": ""
}, context)
Input
- input
object
- client_id required
string
- access_token required
string
- client_id required
Output
Output schema unknown
applications.client_id.tokens.access_token.get
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containing access_token
in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using access_token
as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the blog post.
OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id
and client_secret
as the username and password. Invalid tokens will return 404 NOT FOUND
.
github.applications.client_id.tokens.access_token.get({
"client_id": "",
"access_token": ""
}, context)
Input
- input
object
- client_id required
string
- access_token required
string
- client_id required
Output
- output
- app required
object
- client_id required
string
- name required
string
- url required
string
- client_id required
- created_at required
string
- fingerprint required
string
- hashed_token required
string
- id required
integer
- installation
- account required simple-user
- permissions required
object
- repositories_url required
string
- repository_selection required
string
(values: all, selected): Describe whether all repositories have been selected or there's a selection involved - single_file_name required
string
- note required
string
- note_url required
string
- scopes required
array
: A list of scopes that this authorization is in.- items
string
- items
- token required
string
- token_last_eight required
string
- updated_at required
string
- url required
string
- user
- avatar_url required
string
- events_url required
string
- followers_url required
string
- following_url required
string
- gists_url required
string
- gravatar_id required
string
- html_url required
string
- id required
integer
- login required
string
- node_id required
string
- organizations_url required
string
- received_events_url required
string
- repos_url required
string
- site_admin required
boolean
- starred_at
string
- starred_url required
string
- subscriptions_url required
string
- type required
string
- url required
string
- avatar_url required
- app required
applications.client_id.tokens.access_token.post
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containing access_token
in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using access_token
as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the blog post.
OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id
and client_secret
as the username and password. Invalid tokens will return 404 NOT FOUND
.
github.applications.client_id.tokens.access_token.post({
"client_id": "",
"access_token": ""
}, context)
Input
- input
object
- client_id required
string
- access_token required
string
- client_id required
Output
- output authorization
apps.app_slug.get
Note: The :app_slug
is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., https://github.com/settings/apps/:app_slug
).
If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a personal access token or an installation access token to access this endpoint.
github.apps.app_slug.get({
"app_slug": ""
}, context)
Input
- input
object
- app_slug required
string
: app_slug parameter
- app_slug required
Output
- output integration
authorizations.get
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
github.authorizations.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items authorization
authorizations.post
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
Warning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the blog post.
Creates OAuth tokens using Basic Authentication. If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "Working with two-factor authentication."
To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use fingerprint
to differentiate between them.
You can also create tokens on GitHub from the personal access tokens settings page. Read more about these tokens in the GitHub Help documentation.
Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in the GitHub Help documentation.
github.authorizations.post({}, context)
Input
- input
object
- body
object
- client_id
string
: The OAuth app client key for which to create the token. - client_secret
string
: The OAuth app client secret for which to create the token. - fingerprint
string
: A unique string to distinguish an authorization from others created for the same client ID and user. - note
string
: A note to remind you what the OAuth token is for. - note_url
string
: A URL to remind you what app the OAuth token is for. - scopes
array
: A list of scopes that this authorization is in.- items
string
- items
- client_id
- body
Output
- output authorization
authorizations.clients.client_id.put
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
Warning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the blog post.
Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "Working with two-factor authentication."
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
github.authorizations.clients.client_id.put({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- client_secret required
string
: The OAuth app client secret for which to create the token. - fingerprint
string
: A unique string to distinguish an authorization from others created for the same client ID and user. - note
string
: A note to remind you what the OAuth token is for. - note_url
string
: A URL to remind you what app the OAuth token is for. - scopes
array
: A list of scopes that this authorization is in.- items
string
- items
- client_secret required
- client_id required
Output
- output authorization
authorizations.clients.client_id.fingerprint.put
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
Warning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the blog post.
This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. fingerprint
is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "Working with two-factor authentication."
github.authorizations.clients.client_id.fingerprint.put({
"client_id": "",
"fingerprint": ""
}, context)
Input
- input
object
- client_id required
string
- fingerprint required
string
: fingerprint parameter - body
object
- client_secret required
string
: The OAuth app client secret for which to create the token. - note
string
: A note to remind you what the OAuth token is for. - note_url
string
: A URL to remind you what app the OAuth token is for. - scopes
array
: A list of scopes that this authorization is in.- items
string
- items
- client_secret required
- client_id required
Output
- output authorization
authorizations.authorization_id.delete
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
github.authorizations.authorization_id.delete({
"authorization_id": 0
}, context)
Input
- input
object
- authorization_id required
integer
: authorization_id parameter
- authorization_id required
Output
Output schema unknown
authorizations.authorization_id.get
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
github.authorizations.authorization_id.get({
"authorization_id": 0
}, context)
Input
- input
object
- authorization_id required
integer
: authorization_id parameter
- authorization_id required
Output
- output authorization
authorizations.authorization_id.patch
Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, 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. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "Working with two-factor authentication."
You can only send one of these scope keys at a time.
github.authorizations.authorization_id.patch({
"authorization_id": 0
}, context)
Input
- input
object
- authorization_id required
integer
: authorization_id parameter - body
object
- add_scopes
array
: A list of scopes to add to this authorization.- items
string
- items
- fingerprint
string
: A unique string to distinguish an authorization from others created for the same client ID and user. - note
string
: A note to remind you what the OAuth token is for. - note_url
string
: A URL to remind you what app the OAuth token is for. - remove_scopes
array
: A list of scopes to remove from this authorization.- items
string
- items
- scopes
array
: A list of scopes that this authorization is in.- items
string
- items
- add_scopes
- authorization_id required
Output
- output authorization
codes_of_conduct.get
Get all codes of conduct
github.codes_of_conduct.get(null, context)
Input
This action has no parameters
Output
- output
array
- items code-of-conduct
codes_of_conduct.key.get
Get a code of conduct
github.codes_of_conduct.key.get({
"key": ""
}, context)
Input
- input
object
- key required
string
: key parameter
- key required
Output
- output code-of-conduct
content_references.content_reference_id.attachments.post
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id
of the content reference from the content_reference
event to create an attachment.
The app must create a content attachment within six hours of the content reference URL being posted. See "Using content attachments" for details about content attachments.
You must use an installation access token to access this endpoint.
github.content_references.content_reference_id.attachments.post({
"content_reference_id": 0
}, context)
Input
- input
object
- content_reference_id required
integer
: content_reference_id parameter - body
object
- body required
string
: The body of the attachment - title required
string
: The title of the attachment
- body required
- content_reference_id required
Output
- output content-reference-attachment
emojis.get
Lists all the emojis available to use on GitHub.
github.emojis.get(null, context)
Input
This action has no parameters
Output
- output
object
enterprises.enterprise_id.settings.billing.actions.get
Warning: The Billing API is currently in public beta and subject to change.
Gets the summary of the free and paid GitHub Actions minutes used.
Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".
The authenticated user must be an enterprise admin.
github.enterprises.enterprise_id.settings.billing.actions.get({
"enterprise_id": ""
}, context)
Input
- input
object
- enterprise_id required
string
: Unique identifier of the GitHub Enterprise Cloud instance.
- enterprise_id required
Output
- output actions-billing-usage
enterprises.enterprise_id.settings.billing.packages.get
Warning: The Billing API is currently in public beta and subject to change.
Gets the free and paid storage used for GitHub Packages in gigabytes.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
The authenticated user must be an enterprise admin.
github.enterprises.enterprise_id.settings.billing.packages.get({
"enterprise_id": ""
}, context)
Input
- input
object
- enterprise_id required
string
: Unique identifier of the GitHub Enterprise Cloud instance.
- enterprise_id required
Output
- output packages-billing-usage
enterprises.enterprise_id.settings.billing.shared_storage.get
Warning: The Billing API is currently in public beta and subject to change.
Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
The authenticated user must be an enterprise admin.
github.enterprises.enterprise_id.settings.billing.shared_storage.get({
"enterprise_id": ""
}, context)
Input
- input
object
- enterprise_id required
string
: Unique identifier of the GitHub Enterprise Cloud instance.
- enterprise_id required
Output
- output combined-billing-usage
events.get
We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.
github.events.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items event
feeds.get
GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:
- Timeline: The GitHub global public timeline
- User: The public timeline for any user, using URI template
- Current user public: The public timeline for the authenticated user
- Current user: The private timeline for the authenticated user
- Current user actor: The private timeline for activity created by the authenticated user
- Current user organizations: The private timeline for the organizations the authenticated user is a member of.
- Security advisories: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.
Note: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.
github.feeds.get(null, context)
Input
This action has no parameters
Output
- output feed
gists.get
Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:
github.gists.get({}, context)
Input
- input
object
- since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- since
Output
- output
array
- items base-gist
gists.post
Allows you to add a new gist with one or more files.
Note: Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
github.gists.post({}, context)
Input
- input
object
- body
object
- description
string
: Description of the gist - files required
object
: Names and content for the files that make up the gist
- description
- body
Output
- output gist-full
gists.public.get
List public gists sorted by most recently updated to least recently updated.
Note: With pagination, you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.
github.gists.public.get({}, context)
Input
- input
object
- since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- since
Output
- output
array
- items base-gist
gists.starred.get
List the authenticated user's starred gists:
github.gists.starred.get({}, context)
Input
- input
object
- since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- since
Output
- output
array
- items base-gist
gists.gist_id.delete
Delete a gist
github.gists.gist_id.delete({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.get
Get a gist
github.gists.gist_id.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
- output gist-full
gists.gist_id.patch
Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.
github.gists.gist_id.patch({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - body
object
- description
string
: Description of the gist - files
object
: Names of files to be updated
- description
- gist_id required
Output
- output gist-full
gists.gist_id.comments.get
List gist comments
github.gists.gist_id.comments.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- gist_id required
Output
- output
array
- items gist-comment
gists.gist_id.comments.post
Create a gist comment
github.gists.gist_id.comments.post({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - body
object
- body required
string
: The comment text.
- body required
- gist_id required
Output
- output gist-comment
gists.gist_id.comments.comment_id.delete
Delete a gist comment
github.gists.gist_id.comments.comment_id.delete({
"gist_id": "",
"comment_id": 0
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - comment_id required
integer
: comment_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.comments.comment_id.get
Get a gist comment
github.gists.gist_id.comments.comment_id.get({
"gist_id": "",
"comment_id": 0
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - comment_id required
integer
: comment_id parameter
- gist_id required
Output
- output gist-comment
gists.gist_id.comments.comment_id.patch
Update a gist comment
github.gists.gist_id.comments.comment_id.patch({
"gist_id": "",
"comment_id": 0
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - comment_id required
integer
: comment_id parameter - body
object
- body required
string
: The comment text.
- body required
- gist_id required
Output
- output gist-comment
gists.gist_id.commits.get
List gist commits
github.gists.gist_id.commits.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- gist_id required
Output
- output
array
- items gist-commit
gists.gist_id.forks.get
List gist forks
github.gists.gist_id.forks.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- gist_id required
Output
- output
array
- items gist-full
gists.gist_id.forks.post
Note: This was previously /gists/:gist_id/fork
.
github.gists.gist_id.forks.post({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
- output base-gist
gists.gist_id.star.delete
Unstar a gist
github.gists.gist_id.star.delete({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.star.get
Check if a gist is starred
github.gists.gist_id.star.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.star.put
Note that you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."
github.gists.gist_id.star.put({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.sha.get
Get a gist revision
github.gists.gist_id.sha.get({
"gist_id": "",
"sha": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - sha required
string
: sha parameter
- gist_id required
Output
- output gist-full
gitignore.templates.get
List all templates available to pass as an option when creating a repository.
github.gitignore.templates.get(null, context)
Input
This action has no parameters
Output
- output
array
- items
string
- items
gitignore.templates.name.get
The API also allows fetching the source of a single template. Use the raw media type to get the raw contents.
github.gitignore.templates.name.get({
"name": ""
}, context)
Input
- input
object
- name required
string
: name parameter
- name required
Output
- output gitignore-template
installation.repositories.get
List repositories that an app installation can access.
You must use an installation access token to access this endpoint.
github.installation.repositories.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
object
- repositories
array
- items repository
- repository_selection
string
- total_count
integer
- repositories
installation.token.delete
Revokes the installation token you're using to authenticate as an installation and access this endpoint.
Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "Create an installation access token for an app" endpoint.
You must use an installation access token to access this endpoint.
github.installation.token.delete(null, context)
Input
This action has no parameters
Output
Output schema unknown
issues.get
List issues assigned to the authenticated user across all visible repositories including owned repositories, member
repositories, and organization repositories. You can use the filter
query parameter to fetch issues that are not
necessarily assigned to you. See the Parameters table for more
information.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
the pull_request
key. Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull
request id, use the "List pull requests" endpoint.
github.issues.get({}, context)
Input
- input
object
- filter
string
(values: assigned, created, mentioned, subscribed, all): Indicates which sorts of issues to return. Can be one of: - state
string
(values: open, closed, all): Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
. - labels
string
: A list of comma separated label names. Example:bug,ui,@high
- sort
string
(values: created, updated, comments): What to sort results by. Can be eithercreated
,updated
,comments
. - direction
string
(values: asc, desc): One ofasc
(ascending) ordesc
(descending). - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - collab
boolean
- orgs
boolean
- owned
boolean
- pulls
boolean
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- filter
Output
- output
array
- items issue
licenses.get
Get all commonly used licenses
github.licenses.get({}, context)
Input
- input
object
- featured
boolean
- per_page
integer
: Results per page (max 100)
- featured
Output
- output
array
- items license-simple
licenses.license.get
Get a license
github.licenses.license.get({
"license": ""
}, context)
Input
- input
object
- license required
string
: license parameter
- license required
Output
- output license
markdown.post
Render a Markdown document
github.markdown.post({}, context)
Input
- input
object
- body
object
- context
string
: The repository context to use when creating references ingfm
mode. - mode
string
(values: markdown, gfm): The rendering mode. - text required
string
: The Markdown text to render in HTML.
- context
- body
Output
Output schema unknown
markdown.raw.post
You must send Markdown as plain text (using a Content-Type
header of text/plain
or text/x-markdown
) to this endpoint, rather than using JSON format. In raw mode, GitHub Flavored Markdown is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.
github.markdown.raw.post({}, context)
Input
- input
object
- body
string
- body
Output
- output
string
marketplace_listing.accounts.account_id.get
Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
GitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
github.marketplace_listing.accounts.account_id.get({
"account_id": 0
}, context)
Input
- input
object
- account_id required
integer
: account_id parameter
- account_id required
Output
- output marketplace-purchase
marketplace_listing.plans.get
Lists all plans that are part of your GitHub Marketplace listing.
GitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
github.marketplace_listing.plans.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items marketplace-listing-plan
marketplace_listing.plans.plan_id.accounts.get
Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
GitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
github.marketplace_listing.plans.plan_id.accounts.get({
"plan_id": 0
}, context)
Input
- input
object
- plan_id required
integer
: plan_id parameter - sort
string
(values: created, updated): One ofcreated
(when the repository was starred) orupdated
(when it was last pushed to). - direction
string
(values: asc, desc): To return the oldest accounts first, set toasc
. Can be one ofasc
ordesc
. Ignored without thesort
parameter. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- plan_id required
Output
- output
array
- items marketplace-purchase
marketplace_listing.stubbed.accounts.account_id.get
Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
GitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
github.marketplace_listing.stubbed.accounts.account_id.get({
"account_id": 0
}, context)
Input
- input
object
- account_id required
integer
: account_id parameter
- account_id required
Output
- output marketplace-purchase
marketplace_listing.stubbed.plans.get
Lists all plans that are part of your GitHub Marketplace listing.
GitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
github.marketplace_listing.stubbed.plans.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items marketplace-listing-plan
marketplace_listing.stubbed.plans.plan_id.accounts.get
Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
GitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
github.marketplace_listing.stubbed.plans.plan_id.accounts.get({
"plan_id": 0
}, context)
Input
- input
object
- plan_id required
integer
: plan_id parameter - sort
string
(values: created, updated): One ofcreated
(when the repository was starred) orupdated
(when it was last pushed to). - direction
string
(values: asc, desc): To return the oldest accounts first, set toasc
. Can be one ofasc
ordesc
. Ignored without thesort
parameter. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- plan_id required
Output
- output
array
- items marketplace-purchase
meta.get
This endpoint provides a list of GitHub's IP addresses. For more information, see "About GitHub's IP addresses."
github.meta.get(null, context)
Input
This action has no parameters
Output
- output api-overview
networks.owner.repo.events.get
List public events for a network of repositories
github.networks.owner.repo.events.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items event
notifications.get
List all notifications for the current user, sorted by most recently updated.
github.notifications.get({}, context)
Input
- input
object
- all
boolean
: Iftrue
, show notifications marked as read. - participating
boolean
: Iftrue
, only shows notifications in which the user is directly participating or mentioned. - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - before
string
: Only show notifications updated before the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- all
Output
- output
array
- items thread
notifications.put
Marks all notifications as "read" removes it from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted
status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false
.
github.notifications.put({}, context)
Input
- input
object
- body
object
- last_read_at
string
: Describes the last point that notifications were checked. - read
boolean
: Whether the notification has been read.
- last_read_at
- body
Output
- output
object
- message
string
- message
notifications.threads.thread_id.get
Get a thread
github.notifications.threads.thread_id.get({
"thread_id": 0
}, context)
Input
- input
object
- thread_id required
integer
: thread_id parameter
- thread_id required
Output
- output thread
notifications.threads.thread_id.patch
Mark a thread as read
github.notifications.threads.thread_id.patch({
"thread_id": 0
}, context)
Input
- input
object
- thread_id required
integer
: thread_id parameter
- thread_id required
Output
Output schema unknown
notifications.threads.thread_id.subscription.delete
Mutes all future notifications for a conversation until you comment on the thread or get an @mention. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the Set a thread subscription endpoint and set ignore
to true
.
github.notifications.threads.thread_id.subscription.delete({
"thread_id": 0
}, context)
Input
- input
object
- thread_id required
integer
: thread_id parameter
- thread_id required
Output
Output schema unknown
notifications.threads.thread_id.subscription.get
This checks to see if the current user is subscribed to a thread. You can also get a repository subscription.
Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were @mentioned, or manually subscribe to a thread.
github.notifications.threads.thread_id.subscription.get({
"thread_id": 0
}, context)
Input
- input
object
- thread_id required
integer
: thread_id parameter
- thread_id required
Output
- output thread-subscription
notifications.threads.thread_id.subscription.put
If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an @mention.
You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the Delete a thread subscription endpoint.
github.notifications.threads.thread_id.subscription.put({
"thread_id": 0
}, context)
Input
- input
object
- thread_id required
integer
: thread_id parameter - body
object
- ignored
boolean
: Whether to block all notifications from a thread.
- ignored
- thread_id required
Output
- output thread-subscription
octocat.get
Get the octocat as ASCII art
github.octocat.get({}, context)
Input
- input
object
- s
string
: The words to show in Octocat's speech bubble
- s
Output
- output
string
organizations.get
Lists all organizations, in the order that they were created on GitHub.
Note: Pagination is powered exclusively by the since
parameter. Use the Link header to get the URL for the next page of organizations.
github.organizations.get({}, context)
Input
- input
object
- since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100)
- since
Output
- output
array
- items organization-simple
orgs.org.get
To see many of the organization response values, you need to be an authenticated organization owner with the admin:org
scope. When the value of two_factor_requirement_enabled
is true
, the organization requires all members, billing managers, and outside collaborators to enable two-factor authentication.
GitHub Apps with the Organization plan
permission can use this endpoint to retrieve information about an organization's GitHub plan. See "Authenticating with GitHub Apps" for details. For an example response, see "Response with GitHub plan information."
github.orgs.org.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output organization-full
orgs.org.patch
Parameter Deprecation Notice: GitHub will replace and discontinue members_allowed_repository_creation_type
in favor of more granular permissions. The new input parameters are members_can_create_public_repositories
, members_can_create_private_repositories
for all organizations and members_can_create_internal_repositories
for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the blog post.
Enables an authenticated organization owner with the admin:org
scope to update the organization's profile and member privileges.
github.orgs.org.patch({
"org": ""
}, context)
Input
- input
object
- org required
string
- body
object
- billing_email
string
: Billing email address. This address is not publicized. - blog
string
- company
string
: The company name. - default_repository_permission
string
(values: read, write, admin, none): Default permission level members have for organization repositories: - description
string
: The description of the company. - email
string
: The publicly visible email address. - has_organization_projects
boolean
: Toggles whether an organization can use organization projects. - has_repository_projects
boolean
: Toggles whether repositories that belong to the organization can use repository projects. - location
string
: The location. - members_allowed_repository_creation_type
string
(values: all, private, none): Specifies which types of repositories non-admin organization members can create. Can be one of: - members_can_create_internal_repositories
boolean
: 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: - members_can_create_private_repositories
boolean
: Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: - members_can_create_public_repositories
boolean
: Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: - members_can_create_repositories
boolean
: Toggles the ability of non-admin organization members to create repositories. Can be one of: - name
string
: The shorthand name of the company. - twitter_username
string
: The Twitter username of the company.
- billing_email
- org required
Output
- output organization-full
orgs.org.actions.runners.get
Warning: The self-hosted runners API for organizations is currently in public beta and subject to change.
Lists all self-hosted runners for an organization. You must authenticate using an access token with the admin:org
scope to use this endpoint.
github.orgs.org.actions.runners.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
object
- runners
array
- items runner
- total_count
integer
- runners
orgs.org.actions.runners.downloads.get
Warning: The self-hosted runners API for organizations is currently in public beta and subject to change.
Lists binaries for the runner application that you can download and run. You must authenticate using an access token with the admin:org
scope to use this endpoint.
github.orgs.org.actions.runners.downloads.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output
array
- items runner-application
orgs.org.actions.runners.registration_token.post
Warning: The self-hosted runners API for organizations is currently in public beta and subject to change.
Returns a token that you can pass to the config
script. The token expires after one hour. You must authenticate
using an access token with the admin:org
scope to use this endpoint.
Example using registration token
Configure your self-hosted runner, replacing TOKEN
with the registration token provided by this endpoint.
./config.sh --url https://github.com/octo-org --token TOKEN
github.orgs.org.actions.runners.registration_token.post({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output authentication-token
orgs.org.actions.runners.remove_token.post
Warning: The self-hosted runners API for organizations is currently in public beta and subject to change.
Returns a token that you can pass to the config
script to remove a self-hosted runner from an organization. The
token expires after one hour. You must authenticate using an access token with the admin:org
scope to use this
endpoint.
Example using remove token
To remove your self-hosted runner from an organization, replace TOKEN
with the remove token provided by this
endpoint.
./config.sh remove --token TOKEN
github.orgs.org.actions.runners.remove_token.post({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output authentication-token
orgs.org.actions.runners.runner_id.delete
Warning: The self-hosted runners API for organizations is currently in public beta and subject to change.
Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. You must authenticate using an access token with the admin:org
scope to use this endpoint.
github.orgs.org.actions.runners.runner_id.delete({
"org": "",
"runner_id": 0
}, context)
Input
- input
object
- org required
string
- runner_id required
integer
: runner_id parameter
- org required
Output
Output schema unknown
orgs.org.actions.runners.runner_id.get
Warning: The self-hosted runners API for organizations is currently in public beta and subject to change.
Gets a specific self-hosted runner for an organization. You must authenticate using an access token with the admin:org
scope to use this endpoint.
github.orgs.org.actions.runners.runner_id.get({
"org": "",
"runner_id": 0
}, context)
Input
- input
object
- org required
string
- runner_id required
integer
: runner_id parameter
- org required
Output
- output runner
orgs.org.actions.secrets.get
Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
github.orgs.org.actions.secrets.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
object
- secrets
array
- total_count
integer
- secrets
orgs.org.actions.secrets.public_key.get
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
github.orgs.org.actions.secrets.public_key.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output actions-public-key
orgs.org.actions.secrets.secret_name.delete
Deletes a secret in an organization using the secret name. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
github.orgs.org.actions.secrets.secret_name.delete({
"org": "",
"secret_name": ""
}, context)
Input
- input
object
- org required
string
- secret_name required
string
: secret_name parameter
- org required
Output
Output schema unknown
orgs.org.actions.secrets.secret_name.get
Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
github.orgs.org.actions.secrets.secret_name.get({
"org": "",
"secret_name": ""
}, context)
Input
- input
object
- org required
string
- secret_name required
string
: secret_name parameter
- org required
Output
- output organization-actions-secret
orgs.org.actions.secrets.secret_name.put
Creates or updates an organization secret with an encrypted value. Encrypt your secret using
LibSodium. You must authenticate using an access
token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to
use this endpoint.
Example encrypting a secret using Node.js
Encrypt your secret using the tweetsodium library.
const sodium = require('tweetsodium');
const key = "base64-encoded-public-key";
const value = "plain-text-secret";
// Convert the message and key to Uint8Array's (Buffer implements that interface)
const messageBytes = Buffer.from(value);
const keyBytes = Buffer.from(key, 'base64');
// Encrypt using LibSodium.
const encryptedBytes = sodium.seal(messageBytes, keyBytes);
// Base64 the encrypted secret
const encrypted = Buffer.from(encryptedBytes).toString('base64');
console.log(encrypted);
Example encrypting a secret using Python
Encrypt your secret using pynacl with Python 3.
from base64 import b64encode
from nacl import encoding, public
def encrypt(public_key: str, secret_value: str) -> str:
"""Encrypt a Unicode string using the public key."""
public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
sealed_box = public.SealedBox(public_key)
encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
return b64encode(encrypted).decode("utf-8")
Example encrypting a secret using C#
Encrypt your secret using the Sodium.Core package.
var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
Example encrypting a secret using Ruby
Encrypt your secret using the rbnacl gem.
require "rbnacl"
require "base64"
key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
public_key = RbNaCl::PublicKey.new(key)
box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
encrypted_secret = box.encrypt("my_secret")
# Print the base64 encoded secret
puts Base64.strict_encode64(encrypted_secret)
github.orgs.org.actions.secrets.secret_name.put({
"org": "",
"secret_name": ""
}, context)
Input
- input
object
- org required
string
- secret_name required
string
: secret_name parameter - body
object
- encrypted_value
string
: Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint. - key_id
string
: ID of the key you used to encrypt the secret. - selected_repository_ids
array
: An array of repository ids that can access the organization secret. You can only provide a list of repository ids when thevisibility
is set toselected
. You can manage the list of selected repositories using the List selected repositories for an organization secret, Set selected repositories for an organization secret, and Remove selected repository from an organization secret endpoints.- items
string
- items
- visibility
string
(values: all, private, selected): Configures the access that repositories have to the organization secret. Can be one of:
- encrypted_value
- org required
Output
Output schema unknown
orgs.org.actions.secrets.secret_name.repositories.get
Lists all repositories that have been selected when the visibility
for repository access to a secret is set to selected
. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
github.orgs.org.actions.secrets.secret_name.repositories.get({
"org": "",
"secret_name": ""
}, context)
Input
- input
object
- org required
string
- secret_name required
string
: secret_name parameter
- org required
Output
- output
object
- repositories
array
- items minimal-repository
- total_count
integer
- repositories
orgs.org.actions.secrets.secret_name.repositories.put
Replaces all repositories for an organization secret when the visibility
for repository access is set to selected
. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
github.orgs.org.actions.secrets.secret_name.repositories.put({
"org": "",
"secret_name": ""
}, context)
Input
- input
object
- org required
string
- secret_name required
string
: secret_name parameter - body
object
- selected_repository_ids
array
: An array of repository ids that can access the organization secret. You can only provide a list of repository ids when thevisibility
is set toselected
. You can add and remove individual repositories using the Set selected repositories for an organization secret and Remove selected repository from an organization secret endpoints.- items
integer
- items
- selected_repository_ids
- org required
Output
Output schema unknown
orgs.org.actions.secrets.secret_name.repositories.repository_id.delete
Removes a repository from an organization secret when the visibility
for repository access is set to selected
. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
github.orgs.org.actions.secrets.secret_name.repositories.repository_id.delete({
"org": "",
"secret_name": "",
"repository_id": 0
}, context)
Input
- input
object
- org required
string
- secret_name required
string
: secret_name parameter - repository_id required
integer
: repository_id parameter
- org required
Output
Output schema unknown
orgs.org.actions.secrets.secret_name.repositories.repository_id.put
Adds a repository to an organization secret when the visibility
for repository access is set to selected
. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
github.orgs.org.actions.secrets.secret_name.repositories.repository_id.put({
"org": "",
"secret_name": "",
"repository_id": 0
}, context)
Input
- input
object
- org required
string
- secret_name required
string
: secret_name parameter - repository_id required
integer
: repository_id parameter
- org required
Output
Output schema unknown
orgs.org.blocks.get
List the users blocked by an organization.
github.orgs.org.blocks.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output
array
- items simple-user
orgs.org.blocks.username.delete
Unblock a user from an organization
github.orgs.org.blocks.username.delete({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.blocks.username.get
Check if a user is blocked by an organization
github.orgs.org.blocks.username.get({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.blocks.username.put
Block a user from an organization
github.orgs.org.blocks.username.put({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.credential_authorizations.get
Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see GitHub's products.
An authenticated organization owner with the read:org
scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see About authentication with SAML single sign-on.
github.orgs.org.credential_authorizations.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output
array
- items credential-authorization
orgs.org.credential_authorizations.credential_id.delete
Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see GitHub's products.
An authenticated organization owner with the admin:org
scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.
github.orgs.org.credential_authorizations.credential_id.delete({
"org": "",
"credential_id": 0
}, context)
Input
- input
object
- org required
string
- credential_id required
integer
: credential_id parameter
- org required
Output
Output schema unknown
orgs.org.events.get
List public organization events
github.orgs.org.events.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items event
orgs.org.hooks.get
List organization webhooks
github.orgs.org.hooks.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items org-hook
orgs.org.hooks.post
Here's how you can create a hook that posts payloads in JSON format:
github.orgs.org.hooks.post({
"org": ""
}, context)
Input
- input
object
- org required
string
- body
object
- active
boolean
: Determines if notifications are sent when the webhook is triggered. Set totrue
to send notifications. - config required
object
: Key/value pairs to provide settings for this webhook. These are defined below.- content_type
string
: The media type used to serialize the payloads. Supported values includejson
andform
. The default isform
. - insecure_ssl
string
: Determines whether the SSL certificate of the host forurl
will be verified when delivering payloads. Supported values include0
(verification is performed) and1
(verification is not performed). The default is0
. We strongly recommend not setting this to1
as you are subject to man-in-the-middle and other attacks. - password
string
- secret
string
: If provided, thesecret
will be used as thekey
to generate the HMAC hex digest value in theX-Hub-Signature
header. - url required
string
: The URL to which the payloads will be delivered. - username
string
- content_type
- events
array
: Determines what events the hook is triggered for.- items
string
- items
- name required
string
: Must be passed as "web".
- active
- org required
Output
- output org-hook
orgs.org.hooks.hook_id.delete
Delete an organization webhook
github.orgs.org.hooks.hook_id.delete({
"org": "",
"hook_id": 0
}, context)
Input
- input
object
- org required
string
- hook_id required
integer
- org required
Output
Output schema unknown
orgs.org.hooks.hook_id.get
Get an organization webhook
github.orgs.org.hooks.hook_id.get({
"org": "",
"hook_id": 0
}, context)
Input
- input
object
- org required
string
- hook_id required
integer
- org required
Output
- output org-hook
orgs.org.hooks.hook_id.patch
Update an organization webhook
github.orgs.org.hooks.hook_id.patch({
"org": "",
"hook_id": 0
}, context)
Input
- input
object
- org required
string
- hook_id required
integer
- body
object
- active
boolean
: Determines if notifications are sent when the webhook is triggered. Set totrue
to send notifications. - config
object
: Key/value pairs to provide settings for this webhook. These are defined below.- content_type
string
: The media type used to serialize the payloads. Supported values includejson
andform
. The default isform
. - insecure_ssl
string
: Determines whether the SSL certificate of the host forurl
will be verified when delivering payloads. Supported values include0
(verification is performed) and1
(verification is not performed). The default is0
. We strongly recommend not setting this to1
as you are subject to man-in-the-middle and other attacks. - secret
string
: If provided, thesecret
will be used as thekey
to generate the HMAC hex digest value in theX-Hub-Signature
header. - url required
string
: The URL to which the payloads will be delivered.
- content_type
- events
array
: Determines what events the hook is triggered for.- items
string
- items
- name
string
- active
- org required
Output
- output org-hook
orgs.org.hooks.hook_id.pings.post
This will trigger a ping event to be sent to the hook.
github.orgs.org.hooks.hook_id.pings.post({
"org": "",
"hook_id": 0
}, context)
Input
- input
object
- org required
string
- hook_id required
integer
- org required
Output
Output schema unknown
orgs.org.installation.get
Enables an authenticated GitHub App to find the organization's installation information.
You must use a JWT to access this endpoint.
github.orgs.org.installation.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output installation
orgs.org.installations.get
Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with admin:read
scope to use this endpoint.
github.orgs.org.installations.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
object
- installations
array
- items installation
- total_count
integer
- installations
orgs.org.interaction_limits.delete
Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.
github.orgs.org.interaction_limits.delete({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
Output schema unknown
orgs.org.interaction_limits.get
Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response.
github.orgs.org.interaction_limits.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output interaction-limit
orgs.org.interaction_limits.put
Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions.
github.orgs.org.interaction_limits.put({
"org": ""
}, context)
Input
- input
object
- org required
string
- body
object
- limit required
string
(values: existing_users, contributors_only, collaborators_only): Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of:existing_users
,contributors_only
, orcollaborators_only
.
- limit required
- org required
Output
- output interaction-limit
orgs.org.invitations.get
The return hash contains a role
field which refers to the Organization Invitation role and will be one of the following values: direct_member
, admin
, billing_manager
, hiring_manager
, or reinstate
. If the invitee is not a GitHub member, the login
field in the return hash will be null
.
github.orgs.org.invitations.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items organization-invitation
orgs.org.invitations.post
Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
github.orgs.org.invitations.post({
"org": ""
}, context)
Input
- input
object
- org required
string
- body
object
- email
string
: Required unless you provideinvitee_id
. Email address of the person you are inviting, which can be an existing GitHub user. - invitee_id
integer
: Required unless you provideemail
. GitHub user ID for the person you are inviting. - role
string
(values: admin, direct_member, billing_manager): Specify role for new member. Can be one of: - team_ids
array
: Specify IDs for the teams you want to invite new members to.- items
integer
- items
- email
- org required
Output
- output organization-invitation
orgs.org.invitations.invitation_id.teams.get
List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.
github.orgs.org.invitations.invitation_id.teams.get({
"org": "",
"invitation_id": 0
}, context)
Input
- input
object
- org required
string
- invitation_id required
integer
: invitation_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items team
orgs.org.issues.get
List issues in an organization assigned to the authenticated user.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
the pull_request
key. Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull
request id, use the "List pull requests" endpoint.
github.orgs.org.issues.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- filter
string
(values: assigned, created, mentioned, subscribed, all): Indicates which sorts of issues to return. Can be one of: - state
string
(values: open, closed, all): Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
. - labels
string
: A list of comma separated label names. Example:bug,ui,@high
- sort
string
(values: created, updated, comments): What to sort results by. Can be eithercreated
,updated
,comments
. - direction
string
(values: asc, desc): One ofasc
(ascending) ordesc
(descending). - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items issue
orgs.org.members.get
List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.
github.orgs.org.members.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- filter
string
(values: 2fa_disabled, all): Filter members returned in the list. Can be one of: - role
string
(values: all, admin, member): Filter members returned by their role. Can be one of: - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items simple-user
orgs.org.members.username.delete
Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.
github.orgs.org.members.username.delete({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.members.username.get
Check if a user is, publicly or privately, a member of the organization.
github.orgs.org.members.username.get({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.memberships.username.delete
In order to remove a user's membership with an organization, the authenticated user must be an organization owner.
If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.
github.orgs.org.memberships.username.delete({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.memberships.username.get
In order to get a user's membership with an organization, the authenticated user must be an organization member.
github.orgs.org.memberships.username.get({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
- output org-membership
orgs.org.memberships.username.put
Only authenticated organization owners can add a member to the organization or update the member's role.
-
If the authenticated user is adding a member to the organization, the invited user will receive an email inviting them to the organization. The user's membership status will be
pending
until they accept the invitation. -
Authenticated users can update a user's membership by passing the
role
parameter. If the authenticated user changes a member's role toadmin
, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role tomember
, no email will be sent.
Rate limits
To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.
github.orgs.org.memberships.username.put({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- body
object
- role
string
(values: admin, member): The role to give the user in the organization. Can be one of:
- role
- org required
Output
- output org-membership
orgs.org.migrations.get
Lists the most recent migrations.
github.orgs.org.migrations.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items migration
orgs.org.migrations.post
Initiates the generation of a migration archive.
github.orgs.org.migrations.post({
"org": ""
}, context)
Input
- input
object
- org required
string
- body
object
- exclude
array
- items
string
- items
- exclude_attachments
boolean
: Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). - lock_repositories
boolean
: Indicates whether repositories should be locked (to prevent manipulation) while migrating data. - repositories required
array
: A list of arrays indicating which repositories should be migrated.- items
string
- items
- exclude
- org required
Output
- output migration
orgs.org.migrations.migration_id.get
Fetches the status of a migration.
The state
of a migration can be one of the following values:
-
pending
, which means the migration hasn't started yet. -
exporting
, which means the migration is in progress. -
exported
, which means the migration finished successfully. -
failed
, which means the migration failed.
github.orgs.org.migrations.migration_id.get({
"org": "",
"migration_id": 0
}, context)
Input
- input
object
- org required
string
- migration_id required
integer
: migration_id parameter
- org required
Output
- output migration
orgs.org.migrations.migration_id.archive.delete
Deletes a previous migration archive. Migration archives are automatically deleted after seven days.
github.orgs.org.migrations.migration_id.archive.delete({
"org": "",
"migration_id": 0
}, context)
Input
- input
object
- org required
string
- migration_id required
integer
: migration_id parameter
- org required
Output
Output schema unknown
orgs.org.migrations.migration_id.archive.get
Fetches the URL to a migration archive.
github.orgs.org.migrations.migration_id.archive.get({
"org": "",
"migration_id": 0
}, context)
Input
- input
object
- org required
string
- migration_id required
integer
: migration_id parameter
- org required
Output
Output schema unknown
orgs.org.migrations.migration_id.repos.repo_name.lock.delete
Unlocks a repository that was locked for migration. You should unlock each migrated repository and delete them when the migration is complete and you no longer need the source data.
github.orgs.org.migrations.migration_id.repos.repo_name.lock.delete({
"org": "",
"migration_id": 0,
"repo_name": ""
}, context)
Input
- input
object
- org required
string
- migration_id required
integer
: migration_id parameter - repo_name required
string
: repo_name parameter
- org required
Output
Output schema unknown
orgs.org.migrations.migration_id.repositories.get
List all the repositories for this organization migration.
github.orgs.org.migrations.migration_id.repositories.get({
"org": "",
"migration_id": 0
}, context)
Input
- input
object
- org required
string
- migration_id required
integer
: migration_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items minimal-repository
orgs.org.outside_collaborators.get
List all users who are outside collaborators of an organization.
github.orgs.org.outside_collaborators.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- filter
string
(values: 2fa_disabled, all): Filter the list of outside collaborators. Can be one of: - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items simple-user
orgs.org.outside_collaborators.username.delete
Removing a user from this list will remove them from all the organization's repositories.
github.orgs.org.outside_collaborators.username.delete({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.outside_collaborators.username.put
When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "Converting an organization member to an outside collaborator".
github.orgs.org.outside_collaborators.username.put({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.projects.get
Lists the projects in an organization. Returns a 404 Not Found
status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
github.orgs.org.projects.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- state
string
(values: open, closed, all): Indicates the state of the projects to return. Can be eitheropen
,closed
, orall
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items project
orgs.org.projects.post
Creates an organization project board. Returns a 404 Not Found
status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
github.orgs.org.projects.post({
"org": ""
}, context)
Input
- input
object
- org required
string
- body
object
- body
string
: The description of the project. - name required
string
: The name of the project.
- body
- org required
Output
- output project
orgs.org.public_members.get
Members of an organization can choose to have their membership publicized or not.
github.orgs.org.public_members.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items simple-user
orgs.org.public_members.username.delete
Remove public organization membership for the authenticated user
github.orgs.org.public_members.username.delete({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.public_members.username.get
Check public organization membership for a user
github.orgs.org.public_members.username.get({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.public_members.username.put
The user can publicize their own membership. (A user cannot publicize the membership for another user.)
Note that you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."
github.orgs.org.public_members.username.put({
"org": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- username required
string
- org required
Output
Output schema unknown
orgs.org.repos.get
Lists repositories for the specified organization.
github.orgs.org.repos.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- type
string
(values: all, public, private, forks, sources, member, internal): Specifies the types of repositories you want returned. Can be one ofall
,public
,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 beinternal
. - sort
string
(values: created, updated, pushed, full_name): Can be one ofcreated
,updated
,pushed
,full_name
. - direction
string
(values: asc, desc): Can be one ofasc
ordesc
. Default: when usingfull_name
:asc
, otherwisedesc
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items minimal-repository
orgs.org.repos.post
Creates a new repository in the specified organization. The authenticated user must be a member of the organization.
OAuth scope requirements
When using OAuth, authorizations must include:
-
public_repo
scope orrepo
scope to create a public repository -
repo
scope to create a private repository
github.orgs.org.repos.post({
"org": ""
}, context)
Input
- input
object
- org required
string
- body
object
- allow_merge_commit
boolean
: Eithertrue
to allow merging pull requests with a merge commit, orfalse
to prevent merging pull requests with merge commits. - allow_rebase_merge
boolean
: Eithertrue
to allow rebase-merging pull requests, orfalse
to prevent rebase-merging. - allow_squash_merge
boolean
: Eithertrue
to allow squash-merging pull requests, orfalse
to prevent squash-merging. - auto_init
boolean
: Passtrue
to create an initial commit with empty README. - delete_branch_on_merge
boolean
: Eithertrue
to allow automatically deleting head branches when pull requests are merged, orfalse
to prevent automatic deletion. - description
string
: A short description of the repository. - gitignore_template
string
: Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, "Haskell". - has_issues
boolean
: Eithertrue
to enable issues for this repository orfalse
to disable them. - has_projects
boolean
: Eithertrue
to enable projects for this repository orfalse
to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default isfalse
, and if you passtrue
, the API returns an error. - has_wiki
boolean
: Eithertrue
to enable the wiki for this repository orfalse
to disable it. - homepage
string
: A URL with more information about the repository. - is_template
boolean
: Eithertrue
to make this repo available as a template repository orfalse
to prevent it. - license_template
string
: Choose an open source license template that best suits your needs, and then use the license keyword as thelicense_template
string. For example, "mit" or "mpl-2.0". - name required
string
: The name of the repository. - private
boolean
: Eithertrue
to create a private repository orfalse
to create a public one. - team_id
integer
: The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. - visibility
string
(values: public, private, visibility, internal): Can bepublic
orprivate
. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+,visibility
can also beinternal
. For more information, see "Creating an internal repository" in the GitHub Help documentation.
- allow_merge_commit
- org required
Output
- output repository
orgs.org.settings.billing.actions.get
Warning: The Billing API is currently in public beta and subject to change.
Gets the summary of the free and paid GitHub Actions minutes used.
Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".
Access tokens must have the read:org
scope.
github.orgs.org.settings.billing.actions.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output actions-billing-usage
orgs.org.settings.billing.packages.get
Warning: The Billing API is currently in public beta and subject to change.
Gets the free and paid storage usued for GitHub Packages in gigabytes.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
Access tokens must have the read:org
scope.
github.orgs.org.settings.billing.packages.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output packages-billing-usage
orgs.org.settings.billing.shared_storage.get
Warning: The Billing API is currently in public beta and subject to change.
Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
Access tokens must have the read:org
scope.
github.orgs.org.settings.billing.shared_storage.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- org required
Output
- output combined-billing-usage
orgs.org.team_sync.groups.get
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
List IdP groups available in an organization. You can limit your page results using the per_page
parameter. GitHub generates a url-encoded page
token using a cursor value for where the next page begins. For more information on cursor pagination, see "Offset and Cursor Pagination explained."
The per_page
parameter provides pagination for a list of IdP groups the authenticated user can access in an organization. For example, if the user octocat
wants to see two groups per page in octo-org
via cURL, it would look like this:
github.orgs.org.team_sync.groups.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output group-mapping
orgs.org.teams.get
Lists all teams in an organization that are visible to the authenticated user.
github.orgs.org.teams.get({
"org": ""
}, context)
Input
- input
object
- org required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items team
orgs.org.teams.post
To create a team, the authenticated user must be a member or owner of {org}
. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "Setting team creation permissions."
When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of maintainers
. For more information, see "About teams".
github.orgs.org.teams.post({
"org": ""
}, context)
Input
- input
object
- org required
string
- body
object
- description
string
: The description of the team. - maintainers
array
: List GitHub IDs for organization members who will become team maintainers.- items
string
- items
- name required
string
: The name of the team. - parent_team_id
integer
: The ID of a team to set as the parent team. - permission
string
(values: pull, push, admin): Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of: - privacy
string
(values: secret, closed): The level of privacy this team should have. The options are: - repo_names
array
: The full name (e.g., "organization-name/repository-name") of repositories to add the team to.- items
string
- items
- description
- org required
Output
- output team-full
orgs.org.teams.team_slug.delete
To delete a team, the authenticated user must be an organization owner or team maintainer.
If you are an organization owner, deleting a parent team will delete all of its child teams as well.
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}
.
github.orgs.org.teams.team_slug.delete({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.get
Gets a team using the team's slug
. GitHub generates the slug
from the team name
.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}
.
github.orgs.org.teams.team_slug.get({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter
- org required
Output
- output team-full
orgs.org.teams.team_slug.patch
To edit a team, the authenticated user must either be an organization owner or a team maintainer.
Note: You can also specify a team by org_id
and team_id
using the route PATCH /organizations/{org_id}/team/{team_id}
.
github.orgs.org.teams.team_slug.patch({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - body
object
- description
string
: The description of the team. - name required
string
: The name of the team. - parent_team_id
integer
: The ID of a team to set as the parent team. - permission
string
(values: pull, push, admin): Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of: - privacy
string
(values: secret, closed): The level of privacy this team should have. Editing teams without specifying this parameter leavesprivacy
intact. When a team is nested, theprivacy
for parent teams cannot besecret
. The options are:
- description
- org required
Output
- output team-full
orgs.org.teams.team_slug.discussions.get
List all discussions on a team's page. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/discussions
.
github.orgs.org.teams.team_slug.discussions.get({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - direction
string
(values: asc, desc): One ofasc
(ascending) ordesc
(descending). - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items team-discussion
orgs.org.teams.team_slug.discussions.post
Creates a new discussion post on a team's page. OAuth access tokens require the write:discussion
scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
Note: You can also specify a team by org_id
and team_id
using the route POST /organizations/{org_id}/team/{team_id}/discussions
.
github.orgs.org.teams.team_slug.discussions.post({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - body
object
- body required
string
: The discussion post's body text. - private
boolean
: Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set totrue
to create a private post. - title required
string
: The discussion post's title.
- body required
- org required
Output
- output team-discussion
orgs.org.teams.team_slug.discussions.discussion_number.delete
Delete a discussion from a team's page. OAuth access tokens require the write:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}
.
github.orgs.org.teams.team_slug.discussions.discussion_number.delete({
"org": "",
"team_slug": "",
"discussion_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.discussions.discussion_number.get
Get a specific discussion on a team's page. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}
.
github.orgs.org.teams.team_slug.discussions.discussion_number.get({
"org": "",
"team_slug": "",
"discussion_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- org required
Output
- output team-discussion
orgs.org.teams.team_slug.discussions.discussion_number.patch
Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the write:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}
.
github.orgs.org.teams.team_slug.discussions.discussion_number.patch({
"org": "",
"team_slug": "",
"discussion_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- body
object
- body
string
: The discussion post's body text. - title
string
: The discussion post's title.
- body
- org required
Output
- output team-discussion
orgs.org.teams.team_slug.discussions.discussion_number.comments.get
List all comments on a team discussion. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments
.
github.orgs.org.teams.team_slug.discussions.discussion_number.comments.get({
"org": "",
"team_slug": "",
"discussion_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- direction
string
(values: asc, desc): One ofasc
(ascending) ordesc
(descending). - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items team-discussion-comment
orgs.org.teams.team_slug.discussions.discussion_number.comments.post
Creates a new comment on a team discussion. OAuth access tokens require the write:discussion
scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
Note: You can also specify a team by org_id
and team_id
using the route POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments
.
github.orgs.org.teams.team_slug.discussions.discussion_number.comments.post({
"org": "",
"team_slug": "",
"discussion_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- body
object
- body required
string
: The discussion comment's body text.
- body required
- org required
Output
- output team-discussion-comment
orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.delete
Deletes a comment on a team discussion. OAuth access tokens require the write:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}
.
github.orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.delete({
"org": "",
"team_slug": "",
"discussion_number": 0,
"comment_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- comment_number required
integer
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.get
Get a specific comment on a team discussion. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}
.
github.orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.get({
"org": "",
"team_slug": "",
"discussion_number": 0,
"comment_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- comment_number required
integer
- org required
Output
- output team-discussion-comment
orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.patch
Edits the body text of a discussion comment. OAuth access tokens require the write:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}
.
github.orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.patch({
"org": "",
"team_slug": "",
"discussion_number": 0,
"comment_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- comment_number required
integer
- body
object
- body required
string
: The discussion comment's body text.
- body required
- org required
Output
- output team-discussion-comment
orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.reactions.get
List the reactions to a team discussion comment. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions
.
github.orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.reactions.get({
"org": "",
"team_slug": "",
"discussion_number": 0,
"comment_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- comment_number required
integer
- content
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items reaction
orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.reactions.post
Create a reaction to a team discussion comment. OAuth access tokens require the write:discussion
scope. A response with a Status: 200 OK
means that you already added the reaction type to this team discussion comment.
Note: You can also specify a team by org_id
and team_id
using the route POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions
.
github.orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.reactions.post({
"org": "",
"team_slug": "",
"discussion_number": 0,
"comment_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- comment_number required
integer
- body
object
- content required
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): The reaction type to add to the team discussion comment.
- content required
- org required
Output
- output reaction
orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.reactions.reaction_id.delete
Note: You can also specify a team or organization with team_id
and org_id
using the route DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id
.
Delete a reaction to a team discussion comment. OAuth access tokens require the write:discussion
scope.
github.orgs.org.teams.team_slug.discussions.discussion_number.comments.comment_number.reactions.reaction_id.delete({
"org": "",
"team_slug": "",
"discussion_number": 0,
"comment_number": 0,
"reaction_id": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- comment_number required
integer
- reaction_id required
integer
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.discussions.discussion_number.reactions.get
List the reactions to a team discussion. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions
.
github.orgs.org.teams.team_slug.discussions.discussion_number.reactions.get({
"org": "",
"team_slug": "",
"discussion_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- content
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): Returns a single reaction type. Omit this parameter to list all reactions to a team discussion. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items reaction
orgs.org.teams.team_slug.discussions.discussion_number.reactions.post
Create a reaction to a team discussion. OAuth access tokens require the write:discussion
scope. A response with a Status: 200 OK
means that you already added the reaction type to this team discussion.
Note: You can also specify a team by org_id
and team_id
using the route POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions
.
github.orgs.org.teams.team_slug.discussions.discussion_number.reactions.post({
"org": "",
"team_slug": "",
"discussion_number": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- body
object
- content required
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): The reaction type to add to the team discussion.
- content required
- org required
Output
- output reaction
orgs.org.teams.team_slug.discussions.discussion_number.reactions.reaction_id.delete
Note: You can also specify a team or organization with team_id
and org_id
using the route DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id
.
Delete a reaction to a team discussion. OAuth access tokens require the write:discussion
scope.
github.orgs.org.teams.team_slug.discussions.discussion_number.reactions.reaction_id.delete({
"org": "",
"team_slug": "",
"discussion_number": 0,
"reaction_id": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - discussion_number required
integer
- reaction_id required
integer
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.invitations.get
The return hash contains a role
field which refers to the Organization Invitation role and will be one of the following values: direct_member
, admin
, billing_manager
, hiring_manager
, or reinstate
. If the invitee is not a GitHub member, the login
field in the return hash will be null
.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/invitations
.
github.orgs.org.teams.team_slug.invitations.get({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items organization-invitation
orgs.org.teams.team_slug.members.get
Team members will include the members of child teams.
To list members in a team, the team must be visible to the authenticated user.
github.orgs.org.teams.team_slug.members.get({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - role
string
(values: member, maintainer, all): Filters members returned by their role in the team. Can be one of: - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items simple-user
orgs.org.teams.team_slug.memberships.username.delete
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub."
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}
.
github.orgs.org.teams.team_slug.memberships.username.delete({
"org": "",
"team_slug": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - username required
string
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.memberships.username.get
Team members will include the members of child teams.
To get a user's membership with a team, the team must be visible to the authenticated user.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/memberships/{username}
.
Note: The role
for organization owners returns as maintainer
. For more information about maintainer
roles, see Create a team.
github.orgs.org.teams.team_slug.memberships.username.get({
"org": "",
"team_slug": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - username required
string
- org required
Output
- output team-membership
orgs.org.teams.team_slug.memberships.username.put
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.
Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub."
An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team.
If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
Note: You can also specify a team by org_id
and team_id
using the route PUT /organizations/{org_id}/team/{team_id}/memberships/{username}
.
github.orgs.org.teams.team_slug.memberships.username.put({
"org": "",
"team_slug": "",
"username": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - username required
string
- body
object
- role
string
(values: member, maintainer): The role that this user should have in the team. Can be one of:
- role
- org required
Output
- output team-membership
orgs.org.teams.team_slug.projects.get
Lists the organization projects for a team.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/projects
.
github.orgs.org.teams.team_slug.projects.get({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items team-project
orgs.org.teams.team_slug.projects.project_id.delete
Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have read
access to both the team and project, or admin
access to the team or project. This endpoint removes the project from the team, but does not delete the project.
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}
.
github.orgs.org.teams.team_slug.projects.project_id.delete({
"org": "",
"team_slug": "",
"project_id": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - project_id required
integer
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.projects.project_id.get
Checks whether a team has read
, write
, or admin
permissions for an organization project. The response includes projects inherited from a parent team.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/projects/{project_id}
.
github.orgs.org.teams.team_slug.projects.project_id.get({
"org": "",
"team_slug": "",
"project_id": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - project_id required
integer
- org required
Output
- output team-project
orgs.org.teams.team_slug.projects.project_id.put
Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have admin
permissions for the project. The project and team must be part of the same organization.
Note: You can also specify a team by org_id
and team_id
using the route PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}
.
github.orgs.org.teams.team_slug.projects.project_id.put({
"org": "",
"team_slug": "",
"project_id": 0
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - project_id required
integer
- body
object
- permission
string
(values: read, write, admin): The permission to grant to the team for this project. Can be one of:
- permission
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.repos.get
Lists a team's repositories visible to the authenticated user.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/repos
.
github.orgs.org.teams.team_slug.repos.get({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items minimal-repository
orgs.org.teams.team_slug.repos.owner.repo.delete
If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}
.
github.orgs.org.teams.team_slug.repos.owner.repo.delete({
"org": "",
"team_slug": "",
"owner": "",
"repo": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - owner required
string
- repo required
string
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.repos.owner.repo.get
Checks whether a team has admin
, push
, maintain
, triage
, or pull
permission for a repository. Repositories inherited through a parent team will also be checked.
You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom media type via the application/vnd.github.v3.repository+json
accept header.
If a team doesn't have permission for the repository, you will receive a 404 Not Found
response status.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}
.
github.orgs.org.teams.team_slug.repos.owner.repo.get({
"org": "",
"team_slug": "",
"owner": "",
"repo": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - owner required
string
- repo required
string
- org required
Output
- output team-repository
orgs.org.teams.team_slug.repos.owner.repo.put
To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity
status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."
Note: You can also specify a team by org_id
and team_id
using the route PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}
.
For more information about the permission levels, see "Repository permission levels for an organization".
github.orgs.org.teams.team_slug.repos.owner.repo.put({
"org": "",
"team_slug": "",
"owner": "",
"repo": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - owner required
string
- repo required
string
- body
object
- permission
string
(values: pull, push, admin, maintain, triage): The permission to grant the team on this repository. Can be one of:
- permission
- org required
Output
Output schema unknown
orgs.org.teams.team_slug.team_sync.group_mappings.get
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
List IdP groups connected to a team on GitHub.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings
.
github.orgs.org.teams.team_slug.team_sync.group_mappings.get({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter
- org required
Output
- output group-mapping
orgs.org.teams.team_slug.team_sync.group_mappings.patch
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty groups
array will remove all connections for a team.
Note: You can also specify a team by org_id
and team_id
using the route PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings
.
github.orgs.org.teams.team_slug.team_sync.group_mappings.patch({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - body
object
- groups required
array
: The IdP groups you want to connect to a GitHub team. When updating, the newgroups
object will replace the original one. You must include any existing groups that you don't want to remove.- items
object
- group_description required
string
: Description of the IdP group. - group_id required
string
: ID of the IdP group. - group_name required
string
: Name of the IdP group.
- group_description required
- items
- groups required
- org required
Output
- output group-mapping
orgs.org.teams.team_slug.teams.get
Lists the child teams of the team specified by {team_slug}
.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/teams
.
github.orgs.org.teams.team_slug.teams.get({
"org": "",
"team_slug": ""
}, context)
Input
- input
object
- org required
string
- team_slug required
string
: team_slug parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- org required
Output
- output
array
- items team
projects.columns.cards.card_id.delete
Delete a project card
github.projects.columns.cards.card_id.delete({
"card_id": 0
}, context)
Input
- input
object
- card_id required
integer
: card_id parameter
- card_id required
Output
Output schema unknown
projects.columns.cards.card_id.get
Get a project card
github.projects.columns.cards.card_id.get({
"card_id": 0
}, context)
Input
- input
object
- card_id required
integer
: card_id parameter
- card_id required
Output
- output project-card
projects.columns.cards.card_id.patch
Update an existing project card
github.projects.columns.cards.card_id.patch({
"card_id": 0
}, context)
Input
- input
object
- card_id required
integer
: card_id parameter - body
object
- archived
boolean
: Whether or not the card is archived - note
string
: The project card's note
- archived
- card_id required
Output
- output project-card
projects.columns.cards.card_id.moves.post
Move a project card
github.projects.columns.cards.card_id.moves.post({
"card_id": 0
}, context)
Input
- input
object
- card_id required
integer
: card_id parameter - body
object
- column_id
integer
: The unique identifier of the column the card should be moved to - position required
string
: The position of the card in a column
- column_id
- card_id required
Output
- output
object
projects.columns.column_id.delete
Delete a project column
github.projects.columns.column_id.delete({
"column_id": 0
}, context)
Input
- input
object
- column_id required
integer
: column_id parameter
- column_id required
Output
Output schema unknown
projects.columns.column_id.get
Get a project column
github.projects.columns.column_id.get({
"column_id": 0
}, context)
Input
- input
object
- column_id required
integer
: column_id parameter
- column_id required
Output
- output project-column
projects.columns.column_id.patch
Update an existing project column
github.projects.columns.column_id.patch({
"column_id": 0
}, context)
Input
- input
object
- column_id required
integer
: column_id parameter - body
object
- name required
string
: Name of the project column
- name required
- column_id required
Output
- output project-column
projects.columns.column_id.cards.get
List project cards
github.projects.columns.column_id.cards.get({
"column_id": 0
}, context)
Input
- input
object
- column_id required
integer
: column_id parameter - archived_state
string
(values: all, archived, not_archived): Filters the project cards that are returned by the card's state. Can be one ofall
,archived
, ornot_archived
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- column_id required
Output
- output
array
- items project-card
projects.columns.column_id.cards.post
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request
key.
Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
github.projects.columns.column_id.cards.post({
"column_id": 0
}, context)
Input
- input
object
- column_id required
integer
: column_id parameter
- column_id required
Output
- output project-card
projects.columns.column_id.moves.post
Move a project column
github.projects.columns.column_id.moves.post({
"column_id": 0
}, context)
Input
- input
object
- column_id required
integer
: column_id parameter - body
object
- position required
string
: The position of the column in a project
- position required
- column_id required
Output
- output
object
projects.project_id.delete
Deletes a project board. Returns a 404 Not Found
status if projects are disabled.
github.projects.project_id.delete({
"project_id": 0
}, context)
Input
- input
object
- project_id required
integer
- project_id required
Output
Output schema unknown
projects.project_id.get
Gets a project by its id
. Returns a 404 Not Found
status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
github.projects.project_id.get({
"project_id": 0
}, context)
Input
- input
object
- project_id required
integer
- project_id required
Output
- output project
projects.project_id.patch
Updates a project board's information. Returns a 404 Not Found
status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
github.projects.project_id.patch({
"project_id": 0
}, context)
Input
- input
object
- project_id required
integer
- body
object
- body
string
: Body of the project - name
string
: Name of the project - organization_permission
string
(values: read, write, admin, none): The baseline permission that all organization members have on this project - private
boolean
: Whether or not this project can be seen by everyone. - state
string
: State of the project; either 'open' or 'closed'
- body
- project_id required
Output
- output project
projects.project_id.collaborators.get
Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project admin
to list collaborators.
github.projects.project_id.collaborators.get({
"project_id": 0
}, context)
Input
- input
object
- project_id required
integer
- affiliation
string
(values: outside, direct, all): Filters the collaborators by their affiliation. Can be one of: - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- project_id required
Output
- output
array
- items simple-user
projects.project_id.collaborators.username.delete
Removes a collaborator from an organization project. You must be an organization owner or a project admin
to remove a collaborator.
github.projects.project_id.collaborators.username.delete({
"project_id": 0,
"username": ""
}, context)
Input
- input
object
- project_id required
integer
- username required
string
- project_id required
Output
Output schema unknown
projects.project_id.collaborators.username.put
Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project admin
to add a collaborator.
github.projects.project_id.collaborators.username.put({
"project_id": 0,
"username": ""
}, context)
Input
- input
object
- project_id required
integer
- username required
string
- body
object
- permission
string
(values: read, write, admin): The permission to grant the collaborator.
- permission
- project_id required
Output
Output schema unknown
projects.project_id.collaborators.username.permission.get
Returns the collaborator's permission level for an organization project. Possible values for the permission
key: admin
, write
, read
, none
. You must be an organization owner or a project admin
to review a user's permission level.
github.projects.project_id.collaborators.username.permission.get({
"project_id": 0,
"username": ""
}, context)
Input
- input
object
- project_id required
integer
- username required
string
- project_id required
Output
projects.project_id.columns.get
List project columns
github.projects.project_id.columns.get({
"project_id": 0
}, context)
Input
- input
object
- project_id required
integer
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- project_id required
Output
- output
array
- items project-column
projects.project_id.columns.post
Create a project column
github.projects.project_id.columns.post({
"project_id": 0
}, context)
Input
- input
object
- project_id required
integer
- body
object
- name required
string
: Name of the project column
- name required
- project_id required
Output
- output project-column
rate_limit.get
Note: Accessing this endpoint does not count against your REST API rate limit.
Note: The rate
object is deprecated. If you're writing new API client code or updating existing code, you should use the core
object instead of the rate
object. The core
object contains the same information that is present in the rate
object.
github.rate_limit.get(null, context)
Input
This action has no parameters
Output
- output rate-limit-overview
reactions.reaction_id.delete
Deprecation Notice: This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this blog post.
OAuth access tokens require the write:discussion
scope, when deleting a team discussion or team discussion comment.
github.reactions.reaction_id.delete({
"reaction_id": 0
}, context)
Input
- input
object
- reaction_id required
integer
- reaction_id required
Output
Output schema unknown
repos.owner.repo.delete
Deleting a repository requires admin access. If OAuth is used, the delete_repo
scope is required.
If an organization owner has configured the organization to prevent members from deleting organization-owned
repositories, you will get a 403 Forbidden
response.
github.repos.owner.repo.delete({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
Output schema unknown
repos.owner.repo.get
When you pass the scarlet-witch-preview
media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file.
The parent
and source
objects are present when the repository is a fork. parent
is the repository this repository was forked from, source
is the ultimate source for the network.
github.repos.owner.repo.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output full-repository
repos.owner.repo.patch
Note: To edit a repository's topics, use the Replace all repository topics endpoint.
github.repos.owner.repo.patch({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- allow_merge_commit
boolean
: Eithertrue
to allow merging pull requests with a merge commit, orfalse
to prevent merging pull requests with merge commits. - allow_rebase_merge
boolean
: Eithertrue
to allow rebase-merging pull requests, orfalse
to prevent rebase-merging. - allow_squash_merge
boolean
: Eithertrue
to allow squash-merging pull requests, orfalse
to prevent squash-merging. - archived
boolean
:true
to archive this repository. Note: You cannot unarchive repositories through the API. - default_branch
string
: Updates the default branch for this repository. - delete_branch_on_merge
boolean
: Eithertrue
to allow automatically deleting head branches when pull requests are merged, orfalse
to prevent automatic deletion. - description
string
: A short description of the repository. - has_issues
boolean
: Eithertrue
to enable issues for this repository orfalse
to disable them. - has_projects
boolean
: Eithertrue
to enable projects for this repository orfalse
to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default isfalse
, and if you passtrue
, the API returns an error. - has_wiki
boolean
: Eithertrue
to enable the wiki for this repository orfalse
to disable it. - homepage
string
: A URL with more information about the repository. - is_template
boolean
: Eithertrue
to make this repo available as a template repository orfalse
to prevent it. - name
string
: The name of the repository. - private
boolean
: Eithertrue
to make the repository private orfalse
to make it public. Default:false
. - visibility
string
(values: public, private, visibility, internal): Can bepublic
orprivate
. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+,visibility
can also beinternal
. Thevisibility
parameter overrides theprivate
parameter when you use both along with thenebula-preview
preview header.
- allow_merge_commit
- owner required
Output
- output full-repository
repos.owner.repo.actions.artifacts.get
Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.artifacts.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- artifacts
array
- items artifact
- total_count
integer
- artifacts
repos.owner.repo.actions.artifacts.artifact_id.delete
Deletes an artifact for a workflow run. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
github.repos.owner.repo.actions.artifacts.artifact_id.delete({
"owner": "",
"repo": "",
"artifact_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- artifact_id required
integer
: artifact_id parameter
- owner required
Output
Output schema unknown
repos.owner.repo.actions.artifacts.artifact_id.get
Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.artifacts.artifact_id.get({
"owner": "",
"repo": "",
"artifact_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- artifact_id required
integer
: artifact_id parameter
- owner required
Output
- output artifact
repos.owner.repo.actions.artifacts.artifact_id.archive_format.get
Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for Location:
in
the response header to find the URL for the download. The :archive_format
must be zip
. Anyone with read access to
the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope.
GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.artifacts.artifact_id.archive_format.get({
"owner": "",
"repo": "",
"artifact_id": 0,
"archive_format": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- artifact_id required
integer
: artifact_id parameter - archive_format required
string
: archive_format parameter
- owner required
Output
Output schema unknown
repos.owner.repo.actions.jobs.job_id.get
Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.jobs.job_id.get({
"owner": "",
"repo": "",
"job_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- job_id required
integer
: job_id parameter
- owner required
Output
- output job
repos.owner.repo.actions.jobs.job_id.logs.get
Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look
for Location:
in the response header to find the URL for the download. Anyone with read access to the repository can
use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must
have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.jobs.job_id.logs.get({
"owner": "",
"repo": "",
"job_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- job_id required
integer
: job_id parameter
- owner required
Output
Output schema unknown
repos.owner.repo.actions.runners.get
Lists all self-hosted runners for a repository. You must authenticate using an access token with the repo
scope to use this endpoint.
github.repos.owner.repo.actions.runners.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- runners
array
- items runner
- total_count
integer
- runners
repos.owner.repo.actions.runners.downloads.get
Lists binaries for the runner application that you can download and run. You must authenticate using an access token with the repo
scope to use this endpoint.
github.repos.owner.repo.actions.runners.downloads.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output
array
- items runner-application
repos.owner.repo.actions.runners.registration_token.post
Returns a token that you can pass to the config
script. The token expires after one hour. You must authenticate
using an access token with the repo
scope to use this endpoint.
Example using registration token
Configure your self-hosted runner, replacing TOKEN
with the registration token provided by this endpoint.
./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN
github.repos.owner.repo.actions.runners.registration_token.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output authentication-token
repos.owner.repo.actions.runners.remove_token.post
Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.
You must authenticate using an access token with the repo
scope to use this endpoint.
Example using remove token
To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.
./config.sh remove --token TOKEN
github.repos.owner.repo.actions.runners.remove_token.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output authentication-token
repos.owner.repo.actions.runners.runner_id.delete
Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. You must authenticate using an access token with the repo
scope to use this endpoint.
github.repos.owner.repo.actions.runners.runner_id.delete({
"owner": "",
"repo": "",
"runner_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- runner_id required
integer
: runner_id parameter
- owner required
Output
Output schema unknown
repos.owner.repo.actions.runners.runner_id.get
Gets a specific self-hosted runner. You must authenticate using an access token with the repo
scope to use this endpoint.
github.repos.owner.repo.actions.runners.runner_id.get({
"owner": "",
"repo": "",
"runner_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- runner_id required
integer
: runner_id parameter
- owner required
Output
- output runner
repos.owner.repo.actions.runs.get
Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.runs.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- actor
string
: Returns someone's workflow runs. Use the login for the user who created thepush
associated with the check suite or workflow run. - branch
string
: Returns workflow runs associated with a branch. Use the name of the branch of thepush
. - event
string
: Returns workflow run triggered by the event you specify. For example,push
,pull_request
orissue
. For more information, see "Events that trigger workflows." - status
string
(values: completed, status, conclusion): Returns workflow runs associated with the check runstatus
orconclusion
you specify. For example, a conclusion can besuccess
or a status can becompleted
. For more information, see thestatus
andconclusion
options available in "Create a check run." - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- total_count
integer
- workflow_runs
array
- items workflow-run
- total_count
repos.owner.repo.actions.runs.run_id.delete
Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is
private you must use an access token with the repo
scope. GitHub Apps must have the actions:write
permission to use
this endpoint.
github.repos.owner.repo.actions.runs.run_id.delete({
"owner": "",
"repo": "",
"run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- run_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.actions.runs.run_id.get
Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.runs.run_id.get({
"owner": "",
"repo": "",
"run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- run_id required
integer
- owner required
Output
- output workflow-run
repos.owner.repo.actions.runs.run_id.artifacts.get
Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.runs.run_id.artifacts.get({
"owner": "",
"repo": "",
"run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- run_id required
integer
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- artifacts
array
- items artifact
- total_count
integer
- artifacts
repos.owner.repo.actions.runs.run_id.cancel.post
Cancels a workflow run using its id
. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
github.repos.owner.repo.actions.runs.run_id.cancel.post({
"owner": "",
"repo": "",
"run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- run_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.actions.runs.run_id.jobs.get
Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
github.repos.owner.repo.actions.runs.run_id.jobs.get({
"owner": "",
"repo": "",
"run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- run_id required
integer
- filter
string
(values: latest, all): Filters jobs by theircompleted_at
timestamp. Can be one of: - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- jobs
array
- items job
- total_count
integer
- jobs
repos.owner.repo.actions.runs.run_id.logs.delete
Deletes all logs for a workflow run. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
github.repos.owner.repo.actions.runs.run_id.logs.delete({
"owner": "",
"repo": "",
"run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- run_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.actions.runs.run_id.logs.get
Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for
Location:
in the response header to find the URL for the download. Anyone with read access to the repository can use
this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have
the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.runs.run_id.logs.get({
"owner": "",
"repo": "",
"run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- run_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.actions.runs.run_id.rerun.post
Re-runs your workflow run using its id
. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
github.repos.owner.repo.actions.runs.run_id.rerun.post({
"owner": "",
"repo": "",
"run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- run_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.actions.runs.run_id.timing.get
Warning: This GitHub Actions usage endpoint is currently in public beta and subject to change. For more information, see "GitHub Actions API workflow usage."
Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".
Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.runs.run_id.timing.get({
"owner": "",
"repo": "",
"run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- run_id required
integer
- owner required
Output
- output workflow-run-usage
repos.owner.repo.actions.secrets.get
Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the secrets
repository permission to use this endpoint.
github.repos.owner.repo.actions.secrets.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- secrets
array
- items actions-secret
- total_count
integer
- secrets
repos.owner.repo.actions.secrets.public_key.get
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the secrets
repository permission to use this endpoint.
github.repos.owner.repo.actions.secrets.public_key.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output actions-public-key
repos.owner.repo.actions.secrets.secret_name.delete
Deletes a secret in a repository using the secret name. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the secrets
repository permission to use this endpoint.
github.repos.owner.repo.actions.secrets.secret_name.delete({
"owner": "",
"repo": "",
"secret_name": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- secret_name required
string
: secret_name parameter
- owner required
Output
Output schema unknown
repos.owner.repo.actions.secrets.secret_name.get
Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the secrets
repository permission to use this endpoint.
github.repos.owner.repo.actions.secrets.secret_name.get({
"owner": "",
"repo": "",
"secret_name": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- secret_name required
string
: secret_name parameter
- owner required
Output
- output actions-secret
repos.owner.repo.actions.secrets.secret_name.put
Creates or updates a repository secret with an encrypted value. Encrypt your secret using
LibSodium. You must authenticate using an access
token with the repo
scope to use this endpoint. GitHub Apps must have the secrets
repository permission to use
this endpoint.
Example encrypting a secret using Node.js
Encrypt your secret using the tweetsodium library.
const sodium = require('tweetsodium');
const key = "base64-encoded-public-key";
const value = "plain-text-secret";
// Convert the message and key to Uint8Array's (Buffer implements that interface)
const messageBytes = Buffer.from(value);
const keyBytes = Buffer.from(key, 'base64');
// Encrypt using LibSodium.
const encryptedBytes = sodium.seal(messageBytes, keyBytes);
// Base64 the encrypted secret
const encrypted = Buffer.from(encryptedBytes).toString('base64');
console.log(encrypted);
Example encrypting a secret using Python
Encrypt your secret using pynacl with Python 3.
from base64 import b64encode
from nacl import encoding, public
def encrypt(public_key: str, secret_value: str) -> str:
"""Encrypt a Unicode string using the public key."""
public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
sealed_box = public.SealedBox(public_key)
encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
return b64encode(encrypted).decode("utf-8")
Example encrypting a secret using C#
Encrypt your secret using the Sodium.Core package.
var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
Example encrypting a secret using Ruby
Encrypt your secret using the rbnacl gem.
require "rbnacl"
require "base64"
key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
public_key = RbNaCl::PublicKey.new(key)
box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
encrypted_secret = box.encrypt("my_secret")
# Print the base64 encoded secret
puts Base64.strict_encode64(encrypted_secret)
github.repos.owner.repo.actions.secrets.secret_name.put({
"owner": "",
"repo": "",
"secret_name": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- secret_name required
string
: secret_name parameter - body
object
- encrypted_value
string
: Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint. - key_id
string
: ID of the key you used to encrypt the secret.
- encrypted_value
- owner required
Output
Output schema unknown
repos.owner.repo.actions.workflows.get
Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.workflows.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- total_count
integer
- workflows
array
- items workflow
- total_count
repos.owner.repo.actions.workflows.workflow_id.get
Gets a specific workflow. You can also replace :workflow_id
with :workflow_file_name
. For example, you could use main.yml
. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.workflows.workflow_id.get({
"owner": "",
"repo": "",
"workflow_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- workflow_id required
integer
- owner required
Output
- output workflow
repos.owner.repo.actions.workflows.workflow_id.dispatches.post
You can use this endpoint to manually trigger a GitHub Actions workflow run. You can also replace {workflow_id}
with the workflow file name. For example, you could use main.yml
.
You must configure your GitHub Actions workflow to run when the workflow_dispatch
webhook event occurs. The inputs
are configured in the workflow file. For more information about how to configure the workflow_dispatch
event in the workflow file, see "Events that trigger workflows."
You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint. For more information, see "Creating a personal access token for the command line."
github.repos.owner.repo.actions.workflows.workflow_id.dispatches.post({
"owner": "",
"repo": "",
"workflow_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- workflow_id required
integer
- body
object
- inputs
object
: Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used wheninputs
are omitted. - ref required
string
: The reference of the workflow run. The reference can be a branch, tag, or a commit SHA.
- inputs
- owner required
Output
Output schema unknown
repos.owner.repo.actions.workflows.workflow_id.runs.get
List all workflow runs for a workflow. You can also replace :workflow_id
with :workflow_file_name
. For example, you could use main.yml
. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope.
github.repos.owner.repo.actions.workflows.workflow_id.runs.get({
"owner": "",
"repo": "",
"workflow_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- workflow_id required
integer
- actor
string
: Returns someone's workflow runs. Use the login for the user who created thepush
associated with the check suite or workflow run. - branch
string
: Returns workflow runs associated with a branch. Use the name of the branch of thepush
. - event
string
: Returns workflow run triggered by the event you specify. For example,push
,pull_request
orissue
. For more information, see "Events that trigger workflows." - status
string
(values: completed, status, conclusion): Returns workflow runs associated with the check runstatus
orconclusion
you specify. For example, a conclusion can besuccess
or a status can becompleted
. For more information, see thestatus
andconclusion
options available in "Create a check run." - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- total_count
integer
- workflow_runs
array
- items workflow-run
- total_count
repos.owner.repo.actions.workflows.workflow_id.timing.get
Warning: This GitHub Actions usage endpoint is currently in public beta and subject to change. For more information, see "GitHub Actions API workflow usage."
Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".
You can also replace :workflow_id
with :workflow_file_name
. For example, you could use main.yml
. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
github.repos.owner.repo.actions.workflows.workflow_id.timing.get({
"owner": "",
"repo": "",
"workflow_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- workflow_id required
integer
- owner required
Output
- output workflow-usage
repos.owner.repo.assignees.get
Lists the available assignees for issues in a repository.
github.repos.owner.repo.assignees.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items simple-user
repos.owner.repo.assignees.assignee.get
Checks if a user has permission to be assigned to an issue in this repository.
If the assignee
can be assigned to issues in the repository, a 204
header with no content is returned.
Otherwise a 404
status code is returned.
github.repos.owner.repo.assignees.assignee.get({
"owner": "",
"repo": "",
"assignee": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- assignee required
string
: assignee parameter
- owner required
Output
Output schema unknown
repos.owner.repo.automated_security_fixes.delete
Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "Configuring automated security fixes".
github.repos.owner.repo.automated_security_fixes.delete({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
Output schema unknown
repos.owner.repo.automated_security_fixes.put
Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "Configuring automated security fixes".
github.repos.owner.repo.automated_security_fixes.put({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
Output schema unknown
repos.owner.repo.branches.get
List branches
github.repos.owner.repo.branches.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- protected
boolean
: Setting totrue
returns only protected branches. When set tofalse
, only unprotected branches are returned. Omitting this parameter returns all branches. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items short-branch
repos.owner.repo.branches.branch.get
Get a branch
github.repos.owner.repo.branches.branch.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
- output branch-with-protection
repos.owner.repo.branches.branch.protection.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
Output schema unknown
repos.owner.repo.branches.branch.protection.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
- output branch-protection
repos.owner.repo.branches.branch.protection.put
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Protecting a branch requires admin or owner permissions to the repository.
Note: Passing new arrays of users
and teams
replaces their previous values.
Note: The list of users, apps, and teams in total is limited to 100 items.
github.repos.owner.repo.branches.branch.protection.put({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
object
- allow_deletions
boolean
: Allows deletion of the protected branch by anyone with write access to the repository. Set tofalse
to prevent deletion of the protected branch. Default:false
. For more information, see "Enabling force pushes to a protected branch" in the GitHub Help documentation. - allow_force_pushes
boolean
: Permits force pushes to the protected branch by anyone with write access to the repository. Set totrue
to allow force pushes. Set tofalse
ornull
to block force pushes. Default:false
. For more information, see "Enabling force pushes to a protected branch" in the GitHub Help documentation." - enforce_admins required
boolean
: Enforce all configured restrictions for administrators. Set totrue
to enforce required status checks for repository administrators. Set tonull
to disable. - required_linear_history
boolean
: Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set totrue
to enforce a linear commit history. Set tofalse
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" in the GitHub Help documentation. - required_pull_request_reviews required
object
: Require at least one approving review on a pull request, before merging. Set tonull
to disable.- dismiss_stale_reviews
boolean
: Set totrue
if you want to automatically dismiss approving reviews when someone pushes a new commit. - dismissal_restrictions
object
: Specify which users and teams can dismiss pull request reviews. Pass an emptydismissal_restrictions
object to disable. User and teamdismissal_restrictions
are only available for organization-owned repositories. Omit this parameter for personal repositories.- teams
array
: The list of teamslug
s with dismissal access- items
string
- items
- users
array
: The list of userlogin
s with dismissal access- items
string
- items
- teams
- require_code_owner_reviews
boolean
: Blocks merging pull requests until code owners review them. - required_approving_review_count
integer
: Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
- dismiss_stale_reviews
- required_status_checks required
object
: Require status checks to pass before merging. Set tonull
to disable.- contexts required
array
: The list of status checks to require in order to merge into this branch- items
string
- items
- strict required
boolean
: Require branches to be up to date before merging.
- contexts required
- restrictions required
object
: Restrict who can push to the protected branch. User, app, and teamrestrictions
are only available for organization-owned repositories. Set tonull
to disable.- apps
array
: The list of appslug
s with push access- items
string
- items
- teams required
array
: The list of teamslug
s with push access- items
string
- items
- users required
array
: The list of userlogin
s with push access- items
string
- items
- apps
- allow_deletions
- owner required
Output
- output protected-branch
repos.owner.repo.branches.branch.protection.enforce_admins.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
github.repos.owner.repo.branches.branch.protection.enforce_admins.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
Output schema unknown
repos.owner.repo.branches.branch.protection.enforce_admins.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.enforce_admins.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
repos.owner.repo.branches.branch.protection.enforce_admins.post
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
github.repos.owner.repo.branches.branch.protection.enforce_admins.post({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
repos.owner.repo.branches.branch.protection.required_pull_request_reviews.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.required_pull_request_reviews.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
Output schema unknown
repos.owner.repo.branches.branch.protection.required_pull_request_reviews.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.required_pull_request_reviews.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
repos.owner.repo.branches.branch.protection.required_pull_request_reviews.patch
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
Note: Passing new arrays of users
and teams
replaces their previous values.
github.repos.owner.repo.branches.branch.protection.required_pull_request_reviews.patch({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
object
- dismiss_stale_reviews
boolean
: Set totrue
if you want to automatically dismiss approving reviews when someone pushes a new commit. - dismissal_restrictions
object
: Specify which users and teams can dismiss pull request reviews. Pass an emptydismissal_restrictions
object to disable. User and teamdismissal_restrictions
are only available for organization-owned repositories. Omit this parameter for personal repositories.- teams
array
: The list of teamslug
s with dismissal access- items
string
- items
- users
array
: The list of userlogin
s with dismissal access- items
string
- items
- teams
- require_code_owner_reviews
boolean
: Blocks merging pull requests until code owners have reviewed. - required_approving_review_count
integer
: Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.
- dismiss_stale_reviews
- owner required
Output
repos.owner.repo.branches.branch.protection.required_signatures.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.
github.repos.owner.repo.branches.branch.protection.required_signatures.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
Output schema unknown
repos.owner.repo.branches.branch.protection.required_signatures.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true
indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.
Note: You must enable branch protection to require signed commits.
github.repos.owner.repo.branches.branch.protection.required_signatures.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
repos.owner.repo.branches.branch.protection.required_signatures.post
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.
github.repos.owner.repo.branches.branch.protection.required_signatures.post({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
repos.owner.repo.branches.branch.protection.required_status_checks.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.required_status_checks.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
Output schema unknown
repos.owner.repo.branches.branch.protection.required_status_checks.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.required_status_checks.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
- output status-check-policy
repos.owner.repo.branches.branch.protection.required_status_checks.patch
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
github.repos.owner.repo.branches.branch.protection.required_status_checks.patch({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
object
- contexts
array
: The list of status checks to require in order to merge into this branch- items
string
- items
- strict
boolean
: Require branches to be up to date before merging.
- contexts
- owner required
Output
- output status-check-policy
repos.owner.repo.branches.branch.protection.required_status_checks.contexts.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.required_status_checks.contexts.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: contexts parameter- items
string
- items
- owner required
Output
- output
array
- items
string
- items
repos.owner.repo.branches.branch.protection.required_status_checks.contexts.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.required_status_checks.contexts.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
- output
array
- items
string
- items
repos.owner.repo.branches.branch.protection.required_status_checks.contexts.post
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.required_status_checks.contexts.post({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: contexts parameter- items
string
- items
- owner required
Output
- output
array
- items
string
- items
repos.owner.repo.branches.branch.protection.required_status_checks.contexts.put
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.branches.branch.protection.required_status_checks.contexts.put({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: contexts parameter- items
string
- items
- owner required
Output
- output
array
- items
string
- items
repos.owner.repo.branches.branch.protection.restrictions.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Disables the ability to restrict who can push to this branch.
github.repos.owner.repo.branches.branch.protection.restrictions.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
Output schema unknown
repos.owner.repo.branches.branch.protection.restrictions.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Lists who has access to this protected branch.
Note: Users, apps, and teams restrictions
are only available for organization-owned repositories.
github.repos.owner.repo.branches.branch.protection.restrictions.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
- output branch-restriction-policy
repos.owner.repo.branches.branch.protection.restrictions.apps.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Removes the ability of an app to push to this branch. Only installed GitHub Apps with write
access to the contents
permission can be added as authorized actors on a protected branch.
Type | Description |
---|---|
array |
The GitHub Apps that have push access to this branch. Use the app's slug . Note: The list of users, apps, and teams in total is limited to 100 items. |
github.repos.owner.repo.branches.branch.protection.restrictions.apps.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: apps parameter- items
string
- items
- owner required
Output
- output
array
- items integration
repos.owner.repo.branches.branch.protection.restrictions.apps.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with write
access to the contents
permission can be added as authorized actors on a protected branch.
github.repos.owner.repo.branches.branch.protection.restrictions.apps.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
- output
array
- items integration
repos.owner.repo.branches.branch.protection.restrictions.apps.post
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Grants the specified apps push access for this branch. Only installed GitHub Apps with write
access to the contents
permission can be added as authorized actors on a protected branch.
Type | Description |
---|---|
array |
The GitHub Apps that have push access to this branch. Use the app's slug . Note: The list of users, apps, and teams in total is limited to 100 items. |
github.repos.owner.repo.branches.branch.protection.restrictions.apps.post({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: apps parameter- items
string
- items
- owner required
Output
- output
array
- items integration
repos.owner.repo.branches.branch.protection.restrictions.apps.put
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with write
access to the contents
permission can be added as authorized actors on a protected branch.
Type | Description |
---|---|
array |
The GitHub Apps that have push access to this branch. Use the app's slug . Note: The list of users, apps, and teams in total is limited to 100 items. |
github.repos.owner.repo.branches.branch.protection.restrictions.apps.put({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: apps parameter- items
string
- items
- owner required
Output
- output
array
- items integration
repos.owner.repo.branches.branch.protection.restrictions.teams.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Removes the ability of a team to push to this branch. You can also remove push access for child teams.
Type | Description |
---|---|
array |
Teams that should no longer have push access. Use the team's slug . Note: The list of users, apps, and teams in total is limited to 100 items. |
github.repos.owner.repo.branches.branch.protection.restrictions.teams.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: teams parameter- items
string
- items
- owner required
Output
- output
array
- items team
repos.owner.repo.branches.branch.protection.restrictions.teams.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Lists the teams who have push access to this branch. The list includes child teams.
github.repos.owner.repo.branches.branch.protection.restrictions.teams.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
- output
array
- items team
repos.owner.repo.branches.branch.protection.restrictions.teams.post
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Grants the specified teams push access for this branch. You can also give push access to child teams.
Type | Description |
---|---|
array |
The teams that can have push access. Use the team's slug . Note: The list of users, apps, and teams in total is limited to 100 items. |
github.repos.owner.repo.branches.branch.protection.restrictions.teams.post({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: teams parameter- items
string
- items
- owner required
Output
- output
array
- items team
repos.owner.repo.branches.branch.protection.restrictions.teams.put
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.
Type | Description |
---|---|
array |
The teams that can have push access. Use the team's slug . Note: The list of users, apps, and teams in total is limited to 100 items. |
github.repos.owner.repo.branches.branch.protection.restrictions.teams.put({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: teams parameter- items
string
- items
- owner required
Output
- output
array
- items team
repos.owner.repo.branches.branch.protection.restrictions.users.delete
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Removes the ability of a user to push to this branch.
Type | Description |
---|---|
array |
Usernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items. |
github.repos.owner.repo.branches.branch.protection.restrictions.users.delete({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: users parameter- items
string
- items
- owner required
Output
- output
array
- items simple-user
repos.owner.repo.branches.branch.protection.restrictions.users.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Lists the people who have push access to this branch.
github.repos.owner.repo.branches.branch.protection.restrictions.users.get({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter
- owner required
Output
- output
array
- items simple-user
repos.owner.repo.branches.branch.protection.restrictions.users.post
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Grants the specified people push access for this branch.
Type | Description |
---|---|
array |
Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. |
github.repos.owner.repo.branches.branch.protection.restrictions.users.post({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: users parameter- items
string
- items
- owner required
Output
- output
array
- items simple-user
repos.owner.repo.branches.branch.protection.restrictions.users.put
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.
Type | Description |
---|---|
array |
Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. |
github.repos.owner.repo.branches.branch.protection.restrictions.users.put({
"owner": "",
"repo": "",
"branch": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- branch required
string
: branch+ parameter - body
array
: users parameter- items
string
- items
- owner required
Output
- output
array
- items simple-user
repos.owner.repo.check_runs.post
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Creates a new check run for a specific commit in a repository. Your GitHub App must have the checks:write
permission to create check runs.
github.repos.owner.repo.check_runs.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- actions
array
: 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 thecheck_run.requested_action
webhook to your app. Each action includes alabel
,identifier
anddescription
. A maximum of three actions are accepted. See theactions
object description. To learn more about check runs and requested actions, see "Check runs and requested actions." To learn more about check runs and requested actions, see "Check runs and requested actions."- items
object
- description required
string
: A short explanation of what this action would do. The maximum size is 40 characters. - identifier required
string
: A reference for the action on the integrator's system. The maximum size is 20 characters. - label required
string
: The text to be displayed on a button in the web UI. The maximum size is 20 characters.
- description required
- items
- completed_at
string
: The time the check completed. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - conclusion
string
(values: success, failure, neutral, cancelled, skipped, timed_out, action_required): Required if you providecompleted_at
or astatus
ofcompleted
. The final conclusion of the check. Can be one ofsuccess
,failure
,neutral
,cancelled
,skipped
,timed_out
, oraction_required
. When the conclusion isaction_required
, additional details should be provided on the site specified bydetails_url
. - details_url
string
: 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
string
: A reference for the run on the integrator's system. - head_sha required
string
: The SHA of the commit. - name required
string
: The name of the check. For example, "code-coverage". - output
object
: Check runs can accept a variety of data in theoutput
object, including atitle
andsummary
and can optionally provide descriptive details about the run. See theoutput
object description.- annotations
array
: Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "About status checks". See theannotations
object description for details about how to use this parameter.- items
object
- annotation_level required
string
(values: notice, warning, failure): The level of the annotation. Can be one ofnotice
,warning
, orfailure
. - end_column
integer
: The end column of the annotation. Annotations only supportstart_column
andend_column
on the same line. Omit this parameter ifstart_line
andend_line
have different values. - end_line required
integer
: The end line of the annotation. - message required
string
: A short description of the feedback for these lines of code. The maximum size is 64 KB. - path required
string
: The path of the file to add an annotation to. For example,assets/css/main.css
. - raw_details
string
: Details about this annotation. The maximum size is 64 KB. - start_column
integer
: The start column of the annotation. Annotations only supportstart_column
andend_column
on the same line. Omit this parameter ifstart_line
andend_line
have different values. - start_line required
integer
: The start line of the annotation. - title
string
: The title that represents the annotation. The maximum size is 255 characters.
- annotation_level required
- items
- images
array
: Adds images to the output displayed in the GitHub pull request UI. See theimages
object description for details.- items
object
- alt required
string
: The alternative text for the image. - caption
string
: A short image description. - image_url required
string
: The full URL of the image.
- alt required
- items
- summary required
string
: The summary of the check run. This parameter supports Markdown. - text
string
: The details of the check run. This parameter supports Markdown. - title required
string
: The title of the check run.
- annotations
- started_at
string
: The time that the check run began. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - status
string
(values: queued, in_progress, completed): The current status. Can be one ofqueued
,in_progress
, orcompleted
.
- actions
- owner required
Output
- output check-run
repos.owner.repo.check_runs.check_run_id.get
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Gets a single check run using its id
. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo
scope to get check runs in a private repository.
github.repos.owner.repo.check_runs.check_run_id.get({
"owner": "",
"repo": "",
"check_run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- check_run_id required
integer
: check_run_id parameter
- owner required
Output
- output check-run
repos.owner.repo.check_runs.check_run_id.patch
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Updates a check run for a specific commit in a repository. Your GitHub App must have the checks:write
permission to edit check runs.
github.repos.owner.repo.check_runs.check_run_id.patch({
"owner": "",
"repo": "",
"check_run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- check_run_id required
integer
: check_run_id parameter - body
object
- actions
array
: Possible further actions the integrator can perform, which a user may trigger. Each action includes alabel
,identifier
anddescription
. A maximum of three actions are accepted. See theactions
object description. To learn more about check runs and requested actions, see "Check runs and requested actions."- items
object
- description required
string
: A short explanation of what this action would do. The maximum size is 40 characters. - identifier required
string
: A reference for the action on the integrator's system. The maximum size is 20 characters. - label required
string
: The text to be displayed on a button in the web UI. The maximum size is 20 characters.
- description required
- items
- completed_at
string
: The time the check completed. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - conclusion
string
(values: success, failure, neutral, cancelled, skipped, timed_out, action_required): Required if you providecompleted_at
or astatus
ofcompleted
. The final conclusion of the check. Can be one ofsuccess
,failure
,neutral
,cancelled
,skipped
,timed_out
, oraction_required
. - details_url
string
: The URL of the integrator's site that has the full details of the check. - external_id
string
: A reference for the run on the integrator's system. - name
string
: The name of the check. For example, "code-coverage". - output
object
: Check runs can accept a variety of data in theoutput
object, including atitle
andsummary
and can optionally provide descriptive details about the run. See theoutput
object description.- annotations
array
: Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "About status checks". See theannotations
object description for details.- items
object
- annotation_level required
string
(values: notice, warning, failure): The level of the annotation. Can be one ofnotice
,warning
, orfailure
. - end_column
integer
: The end column of the annotation. Annotations only supportstart_column
andend_column
on the same line. Omit this parameter ifstart_line
andend_line
have different values. - end_line required
integer
: The end line of the annotation. - message required
string
: A short description of the feedback for these lines of code. The maximum size is 64 KB. - path required
string
: The path of the file to add an annotation to. For example,assets/css/main.css
. - raw_details
string
: Details about this annotation. The maximum size is 64 KB. - start_column
integer
: The start column of the annotation. Annotations only supportstart_column
andend_column
on the same line. Omit this parameter ifstart_line
andend_line
have different values. - start_line required
integer
: The start line of the annotation. - title
string
: The title that represents the annotation. The maximum size is 255 characters.
- annotation_level required
- items
- images
array
: Adds images to the output displayed in the GitHub pull request UI. See theimages
object description for details.- items
object
- alt required
string
: The alternative text for the image. - caption
string
: A short image description. - image_url required
string
: The full URL of the image.
- alt required
- items
- summary required
string
: Can contain Markdown. - text
string
: Can contain Markdown. - title
string
: Required.
- annotations
- started_at
string
: This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - status
string
(values: queued, in_progress, completed): The current status. Can be one ofqueued
,in_progress
, orcompleted
.
- actions
- owner required
Output
- output check-run
repos.owner.repo.check_runs.check_run_id.annotations.get
Lists annotations for a check run using the annotation id
. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the repo
scope to get annotations for a check run in a private repository.
github.repos.owner.repo.check_runs.check_run_id.annotations.get({
"owner": "",
"repo": "",
"check_run_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- check_run_id required
integer
: check_run_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items check-annotation
repos.owner.repo.check_suites.post
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array and a null
value for head_branch
.
By default, check suites are automatically created when you create a check run. You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "Update repository preferences for check suites". Your GitHub App must have the checks:write
permission to create check suites.
github.repos.owner.repo.check_suites.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- head_sha required
string
: The sha of the head commit.
- head_sha required
- owner required
Output
- output check-suite
repos.owner.repo.check_suites.preferences.patch
Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually Create a check suite. You must have admin permissions in the repository to set preferences for check suites.
github.repos.owner.repo.check_suites.preferences.patch({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- auto_trigger_checks
array
: Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See theauto_trigger_checks
object description for details.- items
object
- app_id required
integer
: Theid
of the GitHub App. - setting required
boolean
: Set totrue
to enable automatic creation of CheckSuite events upon pushes to the repository, orfalse
to disable them.
- app_id required
- items
- auto_trigger_checks
- owner required
Output
- output check-suite-preference
repos.owner.repo.check_suites.check_suite_id.get
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array and a null
value for head_branch
.
Gets a single check suite using its id
. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the repo
scope to get check suites in a private repository.
github.repos.owner.repo.check_suites.check_suite_id.get({
"owner": "",
"repo": "",
"check_suite_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- check_suite_id required
integer
: check_suite_id parameter
- owner required
Output
- output check-suite
repos.owner.repo.check_suites.check_suite_id.check_runs.get
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Lists check runs for a check suite using its id
. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo
scope to get check runs in a private repository.
github.repos.owner.repo.check_suites.check_suite_id.check_runs.get({
"owner": "",
"repo": "",
"check_suite_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- check_suite_id required
integer
: check_suite_id parameter - check_name
string
: Returns check runs with the specifiedname
. - status
string
(values: queued, in_progress, completed): Returns check runs with the specifiedstatus
. Can be one ofqueued
,in_progress
, orcompleted
. - filter
string
(values: latest, all): Filters check runs by theircompleted_at
timestamp. Can be one oflatest
(returning the most recent check runs) orall
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- check_runs
array
- items check-run
- total_count
integer
- check_runs
repos.owner.repo.check_suites.check_suite_id.rerequest.post
Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the check_suite
webhook event with the action rerequested
. When a check suite is rerequested
, its status
is reset to queued
and the conclusion
is cleared.
To rerequest a check suite, your GitHub App must have the checks:read
permission on a private repository or pull access to a public repository.
github.repos.owner.repo.check_suites.check_suite_id.rerequest.post({
"owner": "",
"repo": "",
"check_suite_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- check_suite_id required
integer
: check_suite_id parameter
- owner required
Output
Output schema unknown
repos.owner.repo.code_scanning.alerts.get
Lists all open code scanning alerts for the default branch (usually master
) and protected branches in a repository. You must use an access token with the security_events
scope to use this endpoint. GitHub Apps must have the security_events
read permission to use this endpoint.
github.repos.owner.repo.code_scanning.alerts.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- state
string
: Set toclosed
to list only closed code scanning alerts. - ref
string
: Returns a list of code scanning alerts for a specific brach reference. Theref
must be formatted asheads/<branch name>
.
- owner required
Output
- output
array
- items code-scanning-alert
repos.owner.repo.code_scanning.alerts.alert_id.get
Gets a single code scanning alert. You must use an access token with the security_events
scope to use this endpoint. GitHub Apps must have the security_events
read permission to use this endpoint.
The security alert_id
is found at the end of the security alert's URL. For example, the security alert ID for https://github.com/Octo-org/octo-repo/security/code-scanning/88
is 88
.
github.repos.owner.repo.code_scanning.alerts.alert_id.get({
"owner": "",
"repo": "",
"alert_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- alert_id required
integer
: alert_id parameter
- owner required
Output
- output code-scanning-alert
repos.owner.repo.collaborators.get
For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
Team members will include the members of child teams.
github.repos.owner.repo.collaborators.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- affiliation
string
(values: outside, direct, all): Filter collaborators returned by their affiliation. Can be one of: - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items collaborator
repos.owner.repo.collaborators.username.delete
Remove a repository collaborator
github.repos.owner.repo.collaborators.username.delete({
"owner": "",
"repo": "",
"username": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- username required
string
- owner required
Output
Output schema unknown
repos.owner.repo.collaborators.username.get
For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
Team members will include the members of child teams.
github.repos.owner.repo.collaborators.username.get({
"owner": "",
"repo": "",
"username": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- username required
string
- owner required
Output
Output schema unknown
repos.owner.repo.collaborators.username.put
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
For more information the permission levels, see "Repository permission levels for an organization".
Note that, if you choose not to pass any parameters, you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."
The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.
Rate limits
To prevent abuse, you are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.
github.repos.owner.repo.collaborators.username.put({
"owner": "",
"repo": "",
"username": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- username required
string
- body
object
- permission
string
(values: pull, push, admin, maintain, triage): The permission to grant the collaborator. Only valid on organization-owned repositories. Can be one of: - permissions
string
- permission
- owner required
Output
- output repository-invitation
repos.owner.repo.collaborators.username.permission.get
Checks the repository permission of a collaborator. The possible repository permissions are admin
, write
, read
, and none
.
github.repos.owner.repo.collaborators.username.permission.get({
"owner": "",
"repo": "",
"username": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- username required
string
- owner required
Output
repos.owner.repo.comments.get
Commit Comments use these custom media types. You can read more about the use of media types in the API here.
Comments are ordered by ascending ID.
github.repos.owner.repo.comments.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items commit-comment
repos.owner.repo.comments.comment_id.delete
Delete a commit comment
github.repos.owner.repo.comments.comment_id.delete({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter
- owner required
Output
Output schema unknown
repos.owner.repo.comments.comment_id.get
Get a commit comment
github.repos.owner.repo.comments.comment_id.get({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter
- owner required
Output
- output commit-comment
repos.owner.repo.comments.comment_id.patch
Update a commit comment
github.repos.owner.repo.comments.comment_id.patch({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter - body
object
- body required
string
: The contents of the comment
- body required
- owner required
Output
- output commit-comment
repos.owner.repo.comments.comment_id.reactions.get
List the reactions to a commit comment.
github.repos.owner.repo.comments.comment_id.reactions.get({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter - content
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): Returns a single reaction type. Omit this parameter to list all reactions to a commit comment. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items reaction
repos.owner.repo.comments.comment_id.reactions.post
Create a reaction to a commit comment. A response with a Status: 200 OK
means that you already added the reaction type to this commit comment.
github.repos.owner.repo.comments.comment_id.reactions.post({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter - body
object
- content required
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): The reaction type to add to the commit comment.
- content required
- owner required
Output
- output reaction
repos.owner.repo.comments.comment_id.reactions.reaction_id.delete
Note: You can also specify a repository by repository_id
using the route DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id
.
Delete a reaction to a commit comment.
github.repos.owner.repo.comments.comment_id.reactions.reaction_id.delete({
"owner": "",
"repo": "",
"comment_id": 0,
"reaction_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter - reaction_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.commits.get
Signature verification object
The response will include a verification
object that describes the result of verifying the commit's signature. The following fields are included in the verification
object:
These are the possible values for reason
in the verification
object:
Value | Description |
---|---|
expired_key |
The key that made the signature is expired. |
not_signing_key |
The "signing" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error |
There was an error communicating with the signature verification service. |
gpgverify_unavailable |
The signature verification service is currently unavailable. |
unsigned |
The object does not include a signature. |
unknown_signature_type |
A non-PGP signature was found in the commit. |
no_user |
No user was associated with the committer email address in the commit. |
unverified_email |
The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email |
The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key |
The key that made the signature has not been registered with any user's account. |
malformed_signature |
There was an error parsing the signature. |
invalid |
The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid |
None of the above errors applied, so the signature is considered to be verified. |
github.repos.owner.repo.commits.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- sha
string
: SHA or branch to start listing commits from. Default: the repository’s default branch (usuallymaster
). - path
string
: Only commits containing this file path will be returned. - author
string
: GitHub login or email address by which to filter by commit author. - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - until
string
: Only commits before this date will be returned. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items simple-commit
repos.owner.repo.commits.commit_sha.branches_where_head.get
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.
github.repos.owner.repo.commits.commit_sha.branches_where_head.get({
"owner": "",
"repo": "",
"commit_sha": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- commit_sha required
string
: commit_sha+ parameter
- owner required
Output
- output
array
- items branch-short
repos.owner.repo.commits.commit_sha.comments.get
Use the :commit_sha
to specify the commit that will have its comments listed.
github.repos.owner.repo.commits.commit_sha.comments.get({
"owner": "",
"repo": "",
"commit_sha": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- commit_sha required
string
: commit_sha+ parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items commit-comment
repos.owner.repo.commits.commit_sha.comments.post
Create a comment for a commit using its :commit_sha
.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
github.repos.owner.repo.commits.commit_sha.comments.post({
"owner": "",
"repo": "",
"commit_sha": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- commit_sha required
string
: commit_sha+ parameter - body
object
- body required
string
: The contents of the comment. - line
integer
: Deprecated. Use position parameter instead. Line number in the file to comment on. - path
string
: Relative path of the file to comment on. - position
integer
: Line index in the diff to comment on.
- body required
- owner required
Output
- output commit-comment
repos.owner.repo.commits.commit_sha.pulls.get
Lists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.
github.repos.owner.repo.commits.commit_sha.pulls.get({
"owner": "",
"repo": "",
"commit_sha": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- commit_sha required
string
: commit_sha+ parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items pull-request-simple
repos.owner.repo.commits.ref.get
Returns the contents of a single commit reference. You must have read
access for the repository to use this endpoint.
You can pass the appropriate media type to fetch diff
and patch
formats. Diffs with binary data will have no patch
property.
To return only the SHA-1 hash of the commit reference, you can provide the sha
custom media type in the Accept
header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.
Signature verification object
The response will include a verification
object that describes the result of verifying the commit's signature. The following fields are included in the verification
object:
These are the possible values for reason
in the verification
object:
Value | Description |
---|---|
expired_key |
The key that made the signature is expired. |
not_signing_key |
The "signing" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error |
There was an error communicating with the signature verification service. |
gpgverify_unavailable |
The signature verification service is currently unavailable. |
unsigned |
The object does not include a signature. |
unknown_signature_type |
A non-PGP signature was found in the commit. |
no_user |
No user was associated with the committer email address in the commit. |
unverified_email |
The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email |
The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key |
The key that made the signature has not been registered with any user's account. |
malformed_signature |
There was an error parsing the signature. |
invalid |
The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid |
None of the above errors applied, so the signature is considered to be verified. |
github.repos.owner.repo.commits.ref.get({
"owner": "",
"repo": "",
"ref": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- ref required
string
: ref+ parameter
- owner required
Output
- output commit
repos.owner.repo.commits.ref.check_runs.get
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Lists check runs for a commit ref. The ref
can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo
scope to get check runs in a private repository.
github.repos.owner.repo.commits.ref.check_runs.get({
"owner": "",
"repo": "",
"ref": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- ref required
string
: ref+ parameter - check_name
string
: Returns check runs with the specifiedname
. - status
string
(values: queued, in_progress, completed): Returns check runs with the specifiedstatus
. Can be one ofqueued
,in_progress
, orcompleted
. - filter
string
(values: latest, all): Filters check runs by theircompleted_at
timestamp. Can be one oflatest
(returning the most recent check runs) orall
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- check_runs
array
- items check-run
- total_count
integer
- check_runs
repos.owner.repo.commits.ref.check_suites.get
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array and a null
value for head_branch
.
Lists check suites for a commit ref
. The ref
can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the repo
scope to get check suites in a private repository.
github.repos.owner.repo.commits.ref.check_suites.get({
"owner": "",
"repo": "",
"ref": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- ref required
string
: ref+ parameter - app_id
integer
: Filters check suites by GitHub Appid
. - check_name
string
: Returns check runs with the specifiedname
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
object
- check_suites
array
- items check-suite
- total_count
integer
- check_suites
repos.owner.repo.commits.ref.status.get
Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.
The most recent status for each context is returned, up to 100. This field paginates if there are over 100 contexts.
Additionally, a combined state
is returned. The state
is one of:
-
failure if any of the contexts report as
error
orfailure
-
pending if there are no statuses or a context is
pending
-
success if the latest status for all contexts is
success
github.repos.owner.repo.commits.ref.status.get({
"owner": "",
"repo": "",
"ref": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- ref required
string
: ref+ parameter
- owner required
Output
- output combined-commit-status
repos.owner.repo.commits.ref.statuses.get
Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.
This resource is also available via a legacy route: GET /repos/:owner/:repo/statuses/:ref
.
github.repos.owner.repo.commits.ref.statuses.get({
"owner": "",
"repo": "",
"ref": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- ref required
string
: ref+ parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items status
repos.owner.repo.community.code_of_conduct.get
This method returns the contents of the repository's code of conduct file, if one is detected.
github.repos.owner.repo.community.code_of_conduct.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output code-of-conduct
repos.owner.repo.community.profile.get
This endpoint will return all community profile metrics, including an overall health score, repository description, the presence of documentation, detected code of conduct, detected license, and the presence of ISSUE_TEMPLATE, PULL_REQUEST_TEMPLATE, README, and CONTRIBUTING files.
github.repos.owner.repo.community.profile.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output community-profile
repos.owner.repo.compare.base...head.get
Both :base
and :head
must be branch names in :repo
. To compare branches across other repositories in the same network as :repo
, use the format <USERNAME>:branch
.
The response from the API is equivalent to running the git log base..head
command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.
The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed
status have a previous_filename
field showing the previous filename of the file, and files with a modified
status have a patch
field showing the changes made to the file.
Working with large comparisons
The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the List commits to enumerate all commits in the range.
For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range.
Signature verification object
The response will include a verification
object that describes the result of verifying the commit's signature. The following fields are included in the verification
object:
These are the possible values for reason
in the verification
object:
Value | Description |
---|---|
expired_key |
The key that made the signature is expired. |
not_signing_key |
The "signing" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error |
There was an error communicating with the signature verification service. |
gpgverify_unavailable |
The signature verification service is currently unavailable. |
unsigned |
The object does not include a signature. |
unknown_signature_type |
A non-PGP signature was found in the commit. |
no_user |
No user was associated with the committer email address in the commit. |
unverified_email |
The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email |
The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key |
The key that made the signature has not been registered with any user's account. |
malformed_signature |
There was an error parsing the signature. |
invalid |
The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid |
None of the above errors applied, so the signature is considered to be verified. |
github.repos.owner.repo.compare.base...head.get({
"owner": "",
"repo": "",
"base": "",
"head": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- base required
string
: base parameter - head required
string
: head parameter
- owner required
Output
- output commit-comparison
repos.owner.repo.contents.path.delete
Deletes a file in a repository.
You can provide an additional committer
parameter, which is an object containing information about the committer. Or, you can provide an author
parameter, which is an object containing information about the author.
The author
section is optional and is filled in with the committer
information if omitted. If the committer
information is omitted, the authenticated user's information is used.
You must provide values for both name
and email
, whether you choose to use author
or committer
. Otherwise, you'll receive a 422
status code.
github.repos.owner.repo.contents.path.delete({
"owner": "",
"repo": "",
"path": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- path required
string
: path+ parameter - body
object
- author
object
: object containing information about the author.- email
string
: The email of the author (or committer) of the commit - name
string
: The name of the author (or committer) of the commit
- email
- branch
string
: The branch name. Default: the repository’s default branch (usuallymaster
) - committer
object
: object containing information about the committer.- email
string
: The email of the author (or committer) of the commit - name
string
: The name of the author (or committer) of the commit
- email
- message required
string
: The commit message. - sha required
string
: The blob SHA of the file being replaced.
- author
- owner required
Output
- output file-commit
repos.owner.repo.contents.path.get
Gets the contents of a file or directory in a repository. Specify the file path or directory in :path
. If you omit
:path
, you will receive the contents of all files in the repository.
Files and symlinks support a custom media type for retrieving the raw content or rendered HTML (when supported). All content types support a custom media type to ensure the content is returned in a consistent object format.
Note:
- To get a repository's contents recursively, you can recursively get the tree.
- This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the Git Trees API.
- This API supports files up to 1 megabyte in size.
If the content is a directory
The response will be an array of objects, one object for each item in the directory. When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value should be "submodule". This behavior exists in API v3 for backwards compatibility purposes. In the next major version of the API, the type will be returned as "submodule".
If the content is a symlink
If the requested :path
points to a symlink, and the symlink's target is a normal file in the repository, then the
API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object
describing the symlink itself.
If the content is a submodule
The submodule_git_url
identifies the location of the submodule repository, and the sha
identifies a specific
commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out
the submodule at that specific commit.
If the submodule repository is not hosted on github.com, the Git URLs (git_url
and _links["git"]
) and the
github.com URLs (html_url
and _links["html"]
) will have null values.
github.repos.owner.repo.contents.path.get({
"owner": "",
"repo": "",
"path": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- path required
string
: path+ parameter - ref
string
: The name of the commit/branch/tag. Default: the repository’s default branch (usuallymaster
)
- owner required
Output
Output schema unknown
repos.owner.repo.contents.path.put
Creates a new file or replaces an existing file in a repository.
github.repos.owner.repo.contents.path.put({
"owner": "",
"repo": "",
"path": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- path required
string
: path+ parameter - body
object
- author
object
: The author of the file. Default: Thecommitter
or the authenticated user if you omitcommitter
.- date
string
- email required
string
: The email of the author or committer of the commit. You'll receive a422
status code ifemail
is omitted. - name required
string
: The name of the author or committer of the commit. You'll receive a422
status code ifname
is omitted.
- date
- branch
string
: The branch name. Default: the repository’s default branch (usuallymaster
) - committer
object
: The person that committed the file. Default: the authenticated user.- date
string
- email required
string
: The email of the author or committer of the commit. You'll receive a422
status code ifemail
is omitted. - name required
string
: The name of the author or committer of the commit. You'll receive a422
status code ifname
is omitted.
- date
- content required
string
: The new file content, using Base64 encoding. - message required
string
: The commit message. - sha
string
: Required if you are updating a file. The blob SHA of the file being replaced.
- author
- owner required
Output
- output file-commit
repos.owner.repo.contributors.get
Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance.
GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.
github.repos.owner.repo.contributors.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- anon
string
: Set to1
ortrue
to include anonymous contributors in results. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items contributor
repos.owner.repo.deployments.get
Simple filtering of deployments is available via query parameters:
github.repos.owner.repo.deployments.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- sha
string
: The SHA recorded at creation time. - ref
string
: The name of the ref. This can be a branch, tag, or SHA. - task
string
: The name of the task for the deployment (e.g.,deploy
ordeploy:migrations
). - environment
string
: The name of the environment that was deployed to (e.g.,staging
orproduction
). - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items deployment
repos.owner.repo.deployments.post
Deployments offer a few configurable parameters with certain defaults.
The ref
parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them
before we merge a pull request.
The environment
parameter allows deployments to be issued to different runtime environments. Teams often have
multiple environments for verifying their applications, such as production
, staging
, and qa
. This parameter
makes it easier to track which environments have requested deployments. The default environment is production
.
The auto_merge
parameter is used to ensure that the requested ref is not behind the repository's default branch. If
the ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,
the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will
return a failure response.
By default, commit statuses for every submitted context must be in a success
state. The required_contexts
parameter allows you to specify a subset of contexts that must be success
, or to
specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do
not require any contexts or create any commit statuses, the deployment will always succeed.
The payload
parameter is available for any extra information that a deployment system might need. It is a JSON text
field that will be passed on when a deployment event is dispatched.
The task
parameter is used by the deployment system to allow different execution paths. In the web world this might
be deploy:migrations
to run schema changes on the system. In the compiled world this could be a flag to compile an
application with debugging enabled.
Users with repo
or repo_deployment
scopes can create a deployment for a given ref.
Merged branch response
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating a deployment. This auto-merge happens when:
- Auto-merge option is enabled in the repository
- Topic branch does not include the latest changes on the base branch, which is
master
in the response example - There are no merge conflicts
If there are no new commits in the base branch, a new request to create a deployment should give a successful response.
Merge conflict response
This error happens when the auto_merge
option is enabled and when the default branch (in this case master
), can't
be merged into the branch that's being deployed (in this case topic-branch
), due to merge conflicts.
Failed commit status checks
This error happens when the required_contexts
parameter indicates that one or more contexts need to have a success
status for the commit to be deployed, but one or more of the required contexts do not have a state of success
.
github.repos.owner.repo.deployments.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- auto_merge
boolean
: Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. - created_at
string
- description
string
: Short description of the deployment. - environment
string
: Name for the target deployment environment (e.g.,production
,staging
,qa
). - payload
string
: JSON payload with extra information about the deployment. - production_environment
boolean
: Specifies if the given environment is one that end-users directly interact with. Default:true
whenenvironment
isproduction
andfalse
otherwise. - ref required
string
: The ref to deploy. This can be a branch, tag, or SHA. - required_contexts
array
: The status 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.- items
string
- items
- task
string
: Specifies a task to execute (e.g.,deploy
ordeploy:migrations
). - transient_environment
boolean
: Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default:false
- auto_merge
- owner required
Output
- output deployment
repos.owner.repo.deployments.deployment_id.delete
To ensure there can always be an active deployment, you can only delete an inactive deployment. Anyone with repo
or repo_deployment
scopes can delete an inactive deployment.
To set a deployment as inactive, you must:
- Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.
- Mark the active deployment as inactive by adding any non-successful deployment status.
For more information, see "Create a deployment" and "Create a deployment status."
github.repos.owner.repo.deployments.deployment_id.delete({
"owner": "",
"repo": "",
"deployment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- deployment_id required
integer
: deployment_id parameter
- owner required
Output
Output schema unknown
repos.owner.repo.deployments.deployment_id.get
Get a deployment
github.repos.owner.repo.deployments.deployment_id.get({
"owner": "",
"repo": "",
"deployment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- deployment_id required
integer
: deployment_id parameter
- owner required
Output
- output deployment
repos.owner.repo.deployments.deployment_id.statuses.get
Users with pull access can view deployment statuses for a deployment:
github.repos.owner.repo.deployments.deployment_id.statuses.get({
"owner": "",
"repo": "",
"deployment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- deployment_id required
integer
: deployment_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items deployment-status
repos.owner.repo.deployments.deployment_id.statuses.post
Users with push
access can create deployment statuses for a given deployment.
GitHub Apps require read & write
access to "Deployments" and read-only
access to "Repo contents" (for private repos). OAuth Apps require the repo_deployment
scope.
github.repos.owner.repo.deployments.deployment_id.statuses.post({
"owner": "",
"repo": "",
"deployment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- deployment_id required
integer
: deployment_id parameter - body
object
- auto_inactive
boolean
: Adds a newinactive
status to all prior non-transient, non-production environment deployments with the same repository andenvironment
name as the created status's deployment. Aninactive
status is only added to deployments that had asuccess
state. Default:true
- description
string
: A short description of the status. The maximum description length is 140 characters. - environment
string
(values: production, staging, qa): Name for the target deployment environment, which can be changed when setting a deploy status. For example,production
,staging
, orqa
. Note: This parameter requires you to use theapplication/vnd.github.flash-preview+json
custom media type. - environment_url
string
: Sets the URL for accessing your environment. Default:""
- log_url
string
: The full URL of the deployment's output. This parameter replacestarget_url
. We will continue to accepttarget_url
to support legacy uses, but we recommend replacingtarget_url
withlog_url
. Settinglog_url
will automatically settarget_url
to the same value. Default:""
- state required
string
(values: error, failure, inactive, in_progress, queued, pending, success): The state of the status. Can be one oferror
,failure
,inactive
,in_progress
,queued
pending
, orsuccess
. Note: To use theinactive
state, you must provide theapplication/vnd.github.ant-man-preview+json
custom media type. To use thein_progress
andqueued
states, you must provide theapplication/vnd.github.flash-preview+json
custom media type. When you set a transient deployment toinactive
, the deployment will be shown asdestroyed
in GitHub. - target_url
string
: 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 thelog_url
parameter, which replacestarget_url
.
- auto_inactive
- owner required
Output
- output deployment-status
repos.owner.repo.deployments.deployment_id.statuses.status_id.get
Users with pull access can view a deployment status for a deployment:
github.repos.owner.repo.deployments.deployment_id.statuses.status_id.get({
"owner": "",
"repo": "",
"deployment_id": 0,
"status_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- deployment_id required
integer
: deployment_id parameter - status_id required
integer
: status_id parameter
- owner required
Output
- output deployment-status
repos.owner.repo.dispatches.post
You can use this endpoint to trigger a webhook event called repository_dispatch
when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the repository_dispatch
event occurs. For an example repository_dispatch
webhook payload, see "RepositoryDispatchEvent."
The client_payload
parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the client_payload
can include a message that a user would like to send using a GitHub Actions workflow. Or the client_payload
can be used as a test to debug your workflow. For a test example, see the input example.
To give you write access to the repository, you must use a personal access token with the repo
scope. For more information, see "Creating a personal access token for the command line" in the GitHub Help documentation.
This input example shows how you can use the client_payload
as a test to debug your workflow.
github.repos.owner.repo.dispatches.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- client_payload
object
: JSON payload with extra information about the webhook event that your action or worklow may use. - event_type
string
: Required: A custom webhook event name.
- client_payload
- owner required
Output
Output schema unknown
repos.owner.repo.events.get
List repository events
github.repos.owner.repo.events.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items event
repos.owner.repo.forks.get
List forks
github.repos.owner.repo.forks.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- sort
string
(values: newest, oldest, stargazers): The sort order. Can be eithernewest
,oldest
, orstargazers
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items minimal-repository
repos.owner.repo.forks.post
Create a fork for the authenticated user.
Note: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact GitHub Support or GitHub Premium Support.
github.repos.owner.repo.forks.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- organization
string
: Optional parameter to specify the organization name if forking into an organization.
- organization
- owner required
Output
- output repository
repos.owner.repo.git.blobs.post
Create a blob
github.repos.owner.repo.git.blobs.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- content required
string
: The new blob's content. - encoding
string
: The encoding used forcontent
. Currently,"utf-8"
and"base64"
are supported.
- content required
- owner required
Output
- output short-blob
repos.owner.repo.git.blobs.file_sha.get
The content
in the response will always be Base64 encoded.
Note: This API supports blobs up to 100 megabytes in size.
github.repos.owner.repo.git.blobs.file_sha.get({
"owner": "",
"repo": "",
"file_sha": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- file_sha required
string
: file_sha parameter
- owner required
Output
- output blob
repos.owner.repo.git.commits.post
Creates a new Git commit object.
In this example, the payload of the signature would be:
Signature verification object
The response will include a verification
object that describes the result of verifying the commit's signature. The following fields are included in the verification
object:
These are the possible values for reason
in the verification
object:
Value | Description |
---|---|
expired_key |
The key that made the signature is expired. |
not_signing_key |
The "signing" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error |
There was an error communicating with the signature verification service. |
gpgverify_unavailable |
The signature verification service is currently unavailable. |
unsigned |
The object does not include a signature. |
unknown_signature_type |
A non-PGP signature was found in the commit. |
no_user |
No user was associated with the committer email address in the commit. |
unverified_email |
The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email |
The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key |
The key that made the signature has not been registered with any user's account. |
malformed_signature |
There was an error parsing the signature. |
invalid |
The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid |
None of the above errors applied, so the signature is considered to be verified. |
github.repos.owner.repo.git.commits.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- author
object
: Information about the author of the commit. By default, theauthor
will be the authenticated user and the current date. See theauthor
andcommitter
object below for details.- date
string
: Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - email
string
: The email of the author (or committer) of the commit - name
string
: The name of the author (or committer) of the commit
- date
- committer
object
: Information about the person who is making the commit. By default,committer
will use the information set inauthor
. See theauthor
andcommitter
object below for details.- date
string
: Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - email
string
: The email of the author (or committer) of the commit - name
string
: The name of the author (or committer) of the commit
- date
- message required
string
: The commit message - parents
array
: 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.- items
string
- items
- signature
string
: The PGP signature of the commit. GitHub adds the signature to thegpgsig
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 asignature
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 to create signed commits. - tree required
string
: The SHA of the tree object this commit points to
- author
- owner required
Output
- output git-commit
repos.owner.repo.git.commits.commit_sha.get
Gets a Git commit object.
Signature verification object
The response will include a verification
object that describes the result of verifying the commit's signature. The following fields are included in the verification
object:
These are the possible values for reason
in the verification
object:
Value | Description |
---|---|
expired_key |
The key that made the signature is expired. |
not_signing_key |
The "signing" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error |
There was an error communicating with the signature verification service. |
gpgverify_unavailable |
The signature verification service is currently unavailable. |
unsigned |
The object does not include a signature. |
unknown_signature_type |
A non-PGP signature was found in the commit. |
no_user |
No user was associated with the committer email address in the commit. |
unverified_email |
The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email |
The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key |
The key that made the signature has not been registered with any user's account. |
malformed_signature |
There was an error parsing the signature. |
invalid |
The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid |
None of the above errors applied, so the signature is considered to be verified. |
github.repos.owner.repo.git.commits.commit_sha.get({
"owner": "",
"repo": "",
"commit_sha": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- commit_sha required
string
: commit_sha+ parameter
- owner required
Output
- output git-commit
repos.owner.repo.git.matching_refs.ref.get
Returns an array of references from your Git database that match the supplied name. The :ref
in the URL must be formatted as heads/<branch name>
for branches and tags/<tag name>
for tags. If the :ref
doesn't exist in the repository, but existing refs start with :ref
, they will be returned as an array.
When you use this endpoint without providing a :ref
, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just heads
and tags
.
Note: You need to explicitly request a pull request to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "Checking mergeability of pull requests".
If you request matching references for a branch named feature
but the branch feature
doesn't exist, the response can still include other matching head refs that start with the word feature
, such as featureA
and featureB
.
github.repos.owner.repo.git.matching_refs.ref.get({
"owner": "",
"repo": "",
"ref": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- ref required
string
: ref+ parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items git-ref
repos.owner.repo.git.ref.ref.get
Returns a single reference from your Git database. The :ref
in the URL must be formatted as heads/<branch name>
for branches and tags/<tag name>
for tags. If the :ref
doesn't match an existing ref, a 404
is returned.
Note: You need to explicitly request a pull request to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "Checking mergeability of pull requests".
github.repos.owner.repo.git.ref.ref.get({
"owner": "",
"repo": "",
"ref": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- ref required
string
: ref+ parameter
- owner required
Output
- output git-ref
repos.owner.repo.git.refs.post
Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.
github.repos.owner.repo.git.refs.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- key
string
- ref required
string
: 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 required
string
: The SHA1 value for this reference.
- key
- owner required
Output
- output git-ref
repos.owner.repo.git.refs.ref.delete
Delete a reference
github.repos.owner.repo.git.refs.ref.delete({
"owner": "",
"repo": "",
"ref": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- ref required
string
: ref+ parameter
- owner required
Output
Output schema unknown
repos.owner.repo.git.refs.ref.patch
Update a reference
github.repos.owner.repo.git.refs.ref.patch({
"owner": "",
"repo": "",
"ref": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- ref required
string
: ref+ parameter - body
object
- force
boolean
: Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it tofalse
will make sure you're not overwriting work. - sha required
string
: The SHA1 value to set this reference to
- force
- owner required
Output
- output git-ref
repos.owner.repo.git.tags.post
Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then create the refs/tags/[tag]
reference. If you want to create a lightweight tag, you only have to create the tag reference - this call would be unnecessary.
Signature verification object
The response will include a verification
object that describes the result of verifying the commit's signature. The following fields are included in the verification
object:
These are the possible values for reason
in the verification
object:
Value | Description |
---|---|
expired_key |
The key that made the signature is expired. |
not_signing_key |
The "signing" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error |
There was an error communicating with the signature verification service. |
gpgverify_unavailable |
The signature verification service is currently unavailable. |
unsigned |
The object does not include a signature. |
unknown_signature_type |
A non-PGP signature was found in the commit. |
no_user |
No user was associated with the committer email address in the commit. |
unverified_email |
The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email |
The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key |
The key that made the signature has not been registered with any user's account. |
malformed_signature |
There was an error parsing the signature. |
invalid |
The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid |
None of the above errors applied, so the signature is considered to be verified. |
github.repos.owner.repo.git.tags.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- message required
string
: The tag message. - object required
string
: The SHA of the git object this is tagging. - tag required
string
: The tag's name. This is typically a version (e.g., "v0.0.1"). - tagger
object
: An object with information about the individual creating the tag.- date
string
: When this object was tagged. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - email
string
: The email of the author of the tag - name
string
: The name of the author of the tag
- date
- type required
string
(values: commit, tree, blob): The type of the object we're tagging. Normally this is acommit
but it can also be atree
or ablob
.
- message required
- owner required
Output
- output git-tag
repos.owner.repo.git.tags.tag_sha.get
Signature verification object
The response will include a verification
object that describes the result of verifying the commit's signature. The following fields are included in the verification
object:
These are the possible values for reason
in the verification
object:
Value | Description |
---|---|
expired_key |
The key that made the signature is expired. |
not_signing_key |
The "signing" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error |
There was an error communicating with the signature verification service. |
gpgverify_unavailable |
The signature verification service is currently unavailable. |
unsigned |
The object does not include a signature. |
unknown_signature_type |
A non-PGP signature was found in the commit. |
no_user |
No user was associated with the committer email address in the commit. |
unverified_email |
The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email |
The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key |
The key that made the signature has not been registered with any user's account. |
malformed_signature |
There was an error parsing the signature. |
invalid |
The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid |
None of the above errors applied, so the signature is considered to be verified. |
github.repos.owner.repo.git.tags.tag_sha.get({
"owner": "",
"repo": "",
"tag_sha": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- tag_sha required
string
: tag_sha parameter
- owner required
Output
- output git-tag
repos.owner.repo.git.trees.post
The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.
If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "Create a commit" and "Update a reference."
github.repos.owner.repo.git.trees.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- base_tree
string
: The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. - tree required
array
: Objects (ofpath
,mode
,type
, andsha
) specifying a tree structure.- items
object
- content
string
: The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, ortree.sha
. - mode
string
(values: 100644, 100755, 040000, 160000, 120000): The file mode; one of100644
for file (blob),100755
for executable (blob),040000
for subdirectory (tree),160000
for submodule (commit), or120000
for a blob that specifies the path of a symlink. - path
string
: The file referenced in the tree. - sha
string
: The SHA1 checksum ID of the object in the tree. Also calledtree.sha
. If the value isnull
then the file will be deleted. - type
string
(values: blob, tree, commit): Eitherblob
,tree
, orcommit
.
- content
- items
- base_tree
- owner required
Output
- output git-tree
repos.owner.repo.git.trees.tree_sha.get
Returns a single tree using the SHA1 value for that tree.
If truncated
is true
in the response then the number of items in the tree
array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.
github.repos.owner.repo.git.trees.tree_sha.get({
"owner": "",
"repo": "",
"tree_sha": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- tree_sha required
string
: tree_sha parameter - recursive
string
: Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in:tree_sha
. For example, settingrecursive
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.
- owner required
Output
- output git-tree
repos.owner.repo.hooks.get
List repository webhooks
github.repos.owner.repo.hooks.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items hook
repos.owner.repo.hooks.post
Repositories can have multiple webhooks installed. Each webhook should have a unique config
. Multiple webhooks can
share the same config
as long as those webhooks do not have any events
that overlap.
github.repos.owner.repo.hooks.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- active
boolean
: Determines if notifications are sent when the webhook is triggered. Set totrue
to send notifications. - config required
object
: Key/value pairs to provide settings for this webhook. These are defined below.- content_type
string
: The media type used to serialize the payloads. Supported values includejson
andform
. The default isform
. - digest
string
- insecure_ssl
string
: Determines whether the SSL certificate of the host forurl
will be verified when delivering payloads. Supported values include0
(verification is performed) and1
(verification is not performed). The default is0
. We strongly recommend not setting this to1
as you are subject to man-in-the-middle and other attacks. - secret
string
: If provided, thesecret
will be used as thekey
to generate the HMAC hex digest value in theX-Hub-Signature
header. - token
string
- url required
string
: The URL to which the payloads will be delivered.
- content_type
- events
array
: Determines what events the hook is triggered for.- items
string
- items
- name
string
: Useweb
to create a webhook. Default:web
. This parameter only accepts the valueweb
.
- active
- owner required
Output
- output hook
repos.owner.repo.hooks.hook_id.delete
Delete a repository webhook
github.repos.owner.repo.hooks.hook_id.delete({
"owner": "",
"repo": "",
"hook_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- hook_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.hooks.hook_id.get
Get a repository webhook
github.repos.owner.repo.hooks.hook_id.get({
"owner": "",
"repo": "",
"hook_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- hook_id required
integer
- owner required
Output
- output hook
repos.owner.repo.hooks.hook_id.patch
Update a repository webhook
github.repos.owner.repo.hooks.hook_id.patch({
"owner": "",
"repo": "",
"hook_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- hook_id required
integer
- body
object
- active
boolean
: Determines if notifications are sent when the webhook is triggered. Set totrue
to send notifications. - add_events
array
: Determines a list of events to be added to the list of events that the Hook triggers for.- items
string
- items
- config
object
: Key/value pairs to provide settings for this webhook. These are defined below.- address
string
- content_type
string
: The media type used to serialize the payloads. Supported values includejson
andform
. The default isform
. - insecure_ssl
string
: Determines whether the SSL certificate of the host forurl
will be verified when delivering payloads. Supported values include0
(verification is performed) and1
(verification is not performed). The default is0
. We strongly recommend not setting this to1
as you are subject to man-in-the-middle and other attacks. - room
string
- secret
string
: If provided, thesecret
will be used as thekey
to generate the HMAC hex digest value in theX-Hub-Signature
header. - url required
string
: The URL to which the payloads will be delivered.
- address
- events
array
: Determines what events the hook is triggered for. This replaces the entire array of events.- items
string
- items
- remove_events
array
: Determines a list of events to be removed from the list of events that the Hook triggers for.- items
string
- items
- active
- owner required
Output
- output hook
repos.owner.repo.hooks.hook_id.pings.post
This will trigger a ping event to be sent to the hook.
github.repos.owner.repo.hooks.hook_id.pings.post({
"owner": "",
"repo": "",
"hook_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- hook_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.hooks.hook_id.tests.post
This will trigger the hook with the latest push to the current repository if the hook is subscribed to push
events. If the hook is not subscribed to push
events, the server will respond with 204 but no test POST will be generated.
Note: Previously /repos/:owner/:repo/hooks/:hook_id/test
github.repos.owner.repo.hooks.hook_id.tests.post({
"owner": "",
"repo": "",
"hook_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- hook_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.import.delete
Stop an import for a repository.
github.repos.owner.repo.import.delete({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
Output schema unknown
repos.owner.repo.import.get
View the progress of an import.
Import status
This section includes details about the possible values of the status
field of the Import Progress response.
An import that does not have errors will progress through these steps:
-
detecting
- the "detection" step of the import is in progress because the request did not include avcs
parameter. The import is identifying the type of source control present at the URL. -
importing
- the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will includecommit_count
(the total number of raw commits that will be imported) andpercent
(0 - 100, the current progress through the import). -
mapping
- the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. -
pushing
- the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will includepush_percent
, which is the percent value reported bygit push
when it is "Writing objects". -
complete
- the import is complete, and the repository is ready on GitHub.
If there are problems, you will see one of these in the status
field:
-
auth_failed
- the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the Update an import section. -
error
- the import encountered an error. The import progress response will include thefailed_step
and an error message. Contact GitHub Support or GitHub Premium Support for more information. -
detection_needs_auth
- the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the Update an import section. -
detection_found_nothing
- the importer didn't recognize any source control at the URL. To resolve, Cancel the import and retry with the correct URL. -
detection_found_multiple
- the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include aproject_choices
field with the possible project choices as values. To update project choice, please see the Update an import section.
The project_choices field
When multiple projects are found at the provided URL, the response hash will include a project_choices
field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.
Git LFS related fields
This section includes details about Git LFS related fields that may be present in the Import Progress response.
-
use_lfs
- describes whether the import has been opted in or out of using Git LFS. The value can beopt_in
,opt_out
, orundecided
if no action has been taken. -
has_large_files
- the boolean value describing whether files larger than 100MB were found during theimporting
step. -
large_files_size
- the total size in gigabytes of files larger than 100MB found in the originating repository. -
large_files_count
- the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request.
github.repos.owner.repo.import.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output import
repos.owner.repo.import.patch
An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API request. If no parameters are provided, the import will be restarted.
github.repos.owner.repo.import.patch({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- tfvc_project
string
- vcs
string
- vcs_password
string
: The password to provide to the originating repository. - vcs_username
string
: The username to provide to the originating repository.
- tfvc_project
- owner required
Output
- output import
repos.owner.repo.import.put
Start a source import to a GitHub repository using GitHub Importer.
github.repos.owner.repo.import.put({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- tfvc_project
string
: For a tfvc import, the name of the project that is being imported. - vcs
string
(values: subversion, git, mercurial, tfvc): The originating VCS type. Can be one ofsubversion
,git
,mercurial
, ortfvc
. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. - vcs_password
string
: If authentication is required, the password to provide tovcs_url
. - vcs_url required
string
: The URL of the originating repository. - vcs_username
string
: If authentication is required, the username to provide tovcs_url
.
- tfvc_project
- owner required
Output
- output import
repos.owner.repo.import.authors.get
Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username hubot
into something like hubot <hubot@12341234-abab-fefe-8787-fedcba987654>
.
This endpoint and the Map a commit author endpoint allow you to provide correct Git author information.
github.repos.owner.repo.import.authors.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
.
- owner required
Output
- output
array
- items porter-author
repos.owner.repo.import.authors.author_id.patch
Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository.
github.repos.owner.repo.import.authors.author_id.patch({
"owner": "",
"repo": "",
"author_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- author_id required
integer
: author_id parameter - body
object
- email
string
: The new Git author email. - name
string
: The new Git author name. - remote_id
string
- email
- owner required
Output
- output porter-author
repos.owner.repo.import.large_files.get
List files larger than 100MB found during the import
github.repos.owner.repo.import.large_files.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output
array
- items porter-large-file
repos.owner.repo.import.lfs.patch
You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by Git LFS. You can learn more about our LFS feature and working with large files on our help site.
github.repos.owner.repo.import.lfs.patch({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- use_lfs required
string
(values: opt_in, opt_out): Can be one ofopt_in
(large files will be stored using Git LFS) oropt_out
(large files will be removed during the import).
- use_lfs required
- owner required
Output
- output import
repos.owner.repo.installation.get
Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.
You must use a JWT to access this endpoint.
github.repos.owner.repo.installation.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output installation
repos.owner.repo.interaction_limits.delete
Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions.
github.repos.owner.repo.interaction_limits.delete({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
Output schema unknown
repos.owner.repo.interaction_limits.get
Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.
github.repos.owner.repo.interaction_limits.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output interaction-limit
repos.owner.repo.interaction_limits.put
Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions.
github.repos.owner.repo.interaction_limits.put({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- limit required
string
(values: existing_users, contributors_only, collaborators_only): Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of:existing_users
,contributors_only
, orcollaborators_only
.
- limit required
- owner required
Output
- output interaction-limit
repos.owner.repo.invitations.get
When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
github.repos.owner.repo.invitations.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items repository-invitation
repos.owner.repo.invitations.invitation_id.delete
Delete a repository invitation
github.repos.owner.repo.invitations.invitation_id.delete({
"owner": "",
"repo": "",
"invitation_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- invitation_id required
integer
: invitation_id parameter
- owner required
Output
Output schema unknown
repos.owner.repo.invitations.invitation_id.patch
Update a repository invitation
github.repos.owner.repo.invitations.invitation_id.patch({
"owner": "",
"repo": "",
"invitation_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- invitation_id required
integer
: invitation_id parameter - body
object
- permissions
string
(values: read, write, maintain, triage, admin): The permissions that the associated user will have on the repository. Valid values areread
,write
,maintain
,triage
, andadmin
.
- permissions
- owner required
Output
- output repository-invitation
repos.owner.repo.issues.get
List issues in a repository.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
the pull_request
key. Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull
request id, use the "List pull requests" endpoint.
github.repos.owner.repo.issues.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- milestone
string
: If aninteger
is passed, it should refer to a milestone by itsnumber
field. If the string*
is passed, issues with any milestone are accepted. If the stringnone
is passed, issues without milestones are returned. - state
string
(values: open, closed, all): Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
. - assignee
string
: Can be the name of a user. Pass innone
for issues with no assigned user, and*
for issues assigned to any user. - creator
string
: The user that created the issue. - mentioned
string
: A user that's mentioned in the issue. - labels
string
: A list of comma separated label names. Example:bug,ui,@high
- sort
string
(values: created, updated, comments): What to sort results by. Can be eithercreated
,updated
,comments
. - direction
string
(values: asc, desc): One ofasc
(ascending) ordesc
(descending). - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items issue-simple
repos.owner.repo.issues.post
Any user with pull access to a repository can create an issue. If issues are disabled in the repository, the API returns a 410 Gone
status.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
github.repos.owner.repo.issues.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- assignee
string
: 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. - assignees
array
: 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.- items
string
- items
- body
string
: The contents of the issue. - labels
array
: Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise. - milestone
integer
: Thenumber
of the milestone to associate this issue with. NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise. - title required
string
: The title of the issue.
- assignee
- owner required
Output
- output issue
repos.owner.repo.issues.comments.get
By default, Issue Comments are ordered by ascending ID.
github.repos.owner.repo.issues.comments.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- sort
string
(values: created, updated): One ofcreated
(when the repository was starred) orupdated
(when it was last pushed to). - direction
string
(values: asc, desc): Eitherasc
ordesc
. Ignored without thesort
parameter. - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items issue-comment
repos.owner.repo.issues.comments.comment_id.delete
Delete an issue comment
github.repos.owner.repo.issues.comments.comment_id.delete({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter
- owner required
Output
Output schema unknown
repos.owner.repo.issues.comments.comment_id.get
Get an issue comment
github.repos.owner.repo.issues.comments.comment_id.get({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter
- owner required
Output
- output issue-comment
repos.owner.repo.issues.comments.comment_id.patch
Update an issue comment
github.repos.owner.repo.issues.comments.comment_id.patch({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter - body
object
- body required
string
: The contents of the comment.
- body required
- owner required
Output
- output issue-comment
repos.owner.repo.issues.comments.comment_id.reactions.get
List the reactions to an issue comment.
github.repos.owner.repo.issues.comments.comment_id.reactions.get({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter - content
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): Returns a single reaction type. Omit this parameter to list all reactions to an issue comment. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items reaction
repos.owner.repo.issues.comments.comment_id.reactions.post
Create a reaction to an issue comment. A response with a Status: 200 OK
means that you already added the reaction type to this issue comment.
github.repos.owner.repo.issues.comments.comment_id.reactions.post({
"owner": "",
"repo": "",
"comment_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter - body
object
- content required
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): The reaction type to add to the issue comment.
- content required
- owner required
Output
- output reaction
repos.owner.repo.issues.comments.comment_id.reactions.reaction_id.delete
Note: You can also specify a repository by repository_id
using the route DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id
.
Delete a reaction to an issue comment.
github.repos.owner.repo.issues.comments.comment_id.reactions.reaction_id.delete({
"owner": "",
"repo": "",
"comment_id": 0,
"reaction_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- comment_id required
integer
: comment_id parameter - reaction_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.issues.events.get
List issue events for a repository
github.repos.owner.repo.issues.events.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items issue-event
repos.owner.repo.issues.events.event_id.get
Get an issue event
github.repos.owner.repo.issues.events.event_id.get({
"owner": "",
"repo": "",
"event_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- event_id required
integer
: event_id parameter
- owner required
Output
- output issue-event
repos.owner.repo.issues.issue_number.get
The API returns a 301 Moved Permanently
status if the issue was
transferred to another repository. If
the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API
returns a 404 Not Found
status. If the issue was deleted from a repository where the authenticated user has read
access, the API returns a 410 Gone
status. To receive webhook events for transferred and deleted issues, subscribe
to the issues
webhook.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
the pull_request
key. Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull
request id, use the "List pull requests" endpoint.
github.repos.owner.repo.issues.issue_number.get({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter
- owner required
Output
- output issue
repos.owner.repo.issues.issue_number.patch
Issue owners and users with push access can edit an issue.
github.repos.owner.repo.issues.issue_number.patch({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - body
object
- assignee
string
: Login for the user that this issue should be assigned to. This field is deprecated. - assignees
array
: 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.- items
string
- items
- body
string
: The contents of the issue. - labels
array
: 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. - milestone
integer
: Thenumber
of the milestone to associate this issue with ornull
to remove current. NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise. - state
string
(values: open, closed): State of the issue. Eitheropen
orclosed
. - title
string
: The title of the issue.
- assignee
- owner required
Output
- output issue
repos.owner.repo.issues.issue_number.assignees.delete
Removes one or more assignees from an issue.
github.repos.owner.repo.issues.issue_number.assignees.delete({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - body
object
- assignees
array
: 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.- items
string
- items
- assignees
- owner required
Output
- output issue-simple
repos.owner.repo.issues.issue_number.assignees.post
Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
github.repos.owner.repo.issues.issue_number.assignees.post({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - body
object
- assignees
array
: 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.- items
string
- items
- assignees
- owner required
Output
- output issue-simple
repos.owner.repo.issues.issue_number.comments.get
Issue Comments are ordered by ascending ID.
github.repos.owner.repo.issues.issue_number.comments.get({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items issue-comment
repos.owner.repo.issues.issue_number.comments.post
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
github.repos.owner.repo.issues.issue_number.comments.post({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - body
object
- body required
string
: The contents of the comment.
- body required
- owner required
Output
- output issue-comment
repos.owner.repo.issues.issue_number.events.get
List issue events
github.repos.owner.repo.issues.issue_number.events.get({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items issue-event-for-issue
repos.owner.repo.issues.issue_number.labels.delete
Remove all labels from an issue
github.repos.owner.repo.issues.issue_number.labels.delete({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter
- owner required
Output
Output schema unknown
repos.owner.repo.issues.issue_number.labels.get
List labels for an issue
github.repos.owner.repo.issues.issue_number.labels.get({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items label
repos.owner.repo.issues.issue_number.labels.post
Add labels to an issue
github.repos.owner.repo.issues.issue_number.labels.post({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - body
object
- labels required
array
: The name of the label to add to the issue. Must contain at least one label. Note: Alternatively, you can pass a single label as astring
or anarray
of labels directly, but GitHub recommends passing an object with thelabels
key.- items
string
- items
- labels required
- owner required
Output
- output
array
- items label
repos.owner.repo.issues.issue_number.labels.put
Removes any previous labels and sets the new labels for an issue.
github.repos.owner.repo.issues.issue_number.labels.put({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - body
object
- labels
array
: The names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as astring
or anarray
of labels directly, but GitHub recommends passing an object with thelabels
key.- items
string
- items
- labels
- owner required
Output
- output
array
- items label
repos.owner.repo.issues.issue_number.labels.name.delete
Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a 404 Not Found
status if the label does not exist.
github.repos.owner.repo.issues.issue_number.labels.name.delete({
"owner": "",
"repo": "",
"issue_number": 0,
"name": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - name required
string
: name parameter
- owner required
Output
- output
array
- items label
repos.owner.repo.issues.issue_number.lock.delete
Users with push access can unlock an issue's conversation.
github.repos.owner.repo.issues.issue_number.lock.delete({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter
- owner required
Output
Output schema unknown
repos.owner.repo.issues.issue_number.lock.put
Users with push access can lock an issue or pull request's conversation.
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."
github.repos.owner.repo.issues.issue_number.lock.put({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - body
object
- lock_reason
string
(values: 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:
- lock_reason
- owner required
Output
Output schema unknown
repos.owner.repo.issues.issue_number.reactions.get
List the reactions to an issue.
github.repos.owner.repo.issues.issue_number.reactions.get({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - content
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): Returns a single reaction type. Omit this parameter to list all reactions to an issue. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items reaction
repos.owner.repo.issues.issue_number.reactions.post
Create a reaction to an issue. A response with a Status: 200 OK
means that you already added the reaction type to this issue.
github.repos.owner.repo.issues.issue_number.reactions.post({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - body
object
- content required
string
(values: +1, -1, laugh, confused, heart, hooray, rocket, eyes): The reaction type to add to the issue.
- content required
- owner required
Output
- output reaction
repos.owner.repo.issues.issue_number.reactions.reaction_id.delete
Note: You can also specify a repository by repository_id
using the route DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id
.
Delete a reaction to an issue.
github.repos.owner.repo.issues.issue_number.reactions.reaction_id.delete({
"owner": "",
"repo": "",
"issue_number": 0,
"reaction_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - reaction_id required
integer
- owner required
Output
Output schema unknown
repos.owner.repo.issues.issue_number.timeline.get
List timeline events for an issue
github.repos.owner.repo.issues.issue_number.timeline.get({
"owner": "",
"repo": "",
"issue_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- issue_number required
integer
: issue_number parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items issue-event-for-issue
repos.owner.repo.keys.get
List deploy keys
github.repos.owner.repo.keys.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items deploy-key
repos.owner.repo.keys.post
You can create a read-only deploy key.
github.repos.owner.repo.keys.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- key required
string
: The contents of the key. - read_only
boolean
: Iftrue
, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. - title
string
: A name for the key.
- key required
- owner required
Output
- output deploy-key
repos.owner.repo.keys.key_id.delete
Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead.
github.repos.owner.repo.keys.key_id.delete({
"owner": "",
"repo": "",
"key_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- key_id required
integer
: key_id parameter
- owner required
Output
Output schema unknown
repos.owner.repo.keys.key_id.get
Get a deploy key
github.repos.owner.repo.keys.key_id.get({
"owner": "",
"repo": "",
"key_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- key_id required
integer
: key_id parameter
- owner required
Output
- output deploy-key
repos.owner.repo.labels.get
List labels for a repository
github.repos.owner.repo.labels.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items label
repos.owner.repo.labels.post
Create a label
github.repos.owner.repo.labels.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- color
string
: The hexadecimal color code for the label, without the leading#
. - description
string
: A short description of the label. - name required
string
: 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 . For a full list of available emoji and codes, see emoji-cheat-sheet.com.
- color
- owner required
Output
- output label
repos.owner.repo.labels.name.delete
Delete a label
github.repos.owner.repo.labels.name.delete({
"owner": "",
"repo": "",
"name": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- name required
string
: name parameter
- owner required
Output
Output schema unknown
repos.owner.repo.labels.name.get
Get a label
github.repos.owner.repo.labels.name.get({
"owner": "",
"repo": "",
"name": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- name required
string
: name parameter
- owner required
Output
- output label
repos.owner.repo.labels.name.patch
Update a label
github.repos.owner.repo.labels.name.patch({
"owner": "",
"repo": "",
"name": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- name required
string
: name parameter - body
object
- color
string
: The hexadecimal color code for the label, without the leading#
. - description
string
: A short description of the label. - new_name
string
: 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 . For a full list of available emoji and codes, see emoji-cheat-sheet.com.
- color
- owner required
Output
- output label
repos.owner.repo.languages.get
Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.
github.repos.owner.repo.languages.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output language
repos.owner.repo.license.get
This method returns the contents of the repository's license file, if one is detected.
Similar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.
github.repos.owner.repo.license.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output license-content
repos.owner.repo.merges.post
Merge a branch
github.repos.owner.repo.merges.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- base required
string
: The name of the base branch that the head will be merged into. - commit_message
string
: Commit message to use for the merge commit. If omitted, a default message will be used. - head required
string
: The head to merge. This can be a branch name or a commit SHA1.
- base required
- owner required
Output
- output commit
repos.owner.repo.milestones.get
List milestones
github.repos.owner.repo.milestones.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- state
string
(values: open, closed, all): The state of the milestone. Eitheropen
,closed
, orall
. - sort
string
(values: due_on, completeness): What to sort results by. Eitherdue_on
orcompleteness
. - direction
string
(values: asc, desc): The direction of the sort. Eitherasc
ordesc
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items milestone
repos.owner.repo.milestones.post
Create a milestone
github.repos.owner.repo.milestones.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- description
string
: A description of the milestone. - due_on
string
: The milestone due date. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - state
string
(values: open, closed): The state of the milestone. Eitheropen
orclosed
. - title required
string
: The title of the milestone.
- description
- owner required
Output
- output milestone
repos.owner.repo.milestones.milestone_number.delete
Delete a milestone
github.repos.owner.repo.milestones.milestone_number.delete({
"owner": "",
"repo": "",
"milestone_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- milestone_number required
integer
: milestone_number parameter
- owner required
Output
Output schema unknown
repos.owner.repo.milestones.milestone_number.get
Get a milestone
github.repos.owner.repo.milestones.milestone_number.get({
"owner": "",
"repo": "",
"milestone_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- milestone_number required
integer
: milestone_number parameter
- owner required
Output
- output milestone
repos.owner.repo.milestones.milestone_number.patch
Update a milestone
github.repos.owner.repo.milestones.milestone_number.patch({
"owner": "",
"repo": "",
"milestone_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- milestone_number required
integer
: milestone_number parameter - body
object
- description
string
: A description of the milestone. - due_on
string
: The milestone due date. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - state
string
(values: open, closed): The state of the milestone. Eitheropen
orclosed
. - title
string
: The title of the milestone.
- description
- owner required
Output
- output milestone
repos.owner.repo.milestones.milestone_number.labels.get
List labels for issues in a milestone
github.repos.owner.repo.milestones.milestone_number.labels.get({
"owner": "",
"repo": "",
"milestone_number": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- milestone_number required
integer
: milestone_number parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items label
repos.owner.repo.notifications.get
List all notifications for the current user.
github.repos.owner.repo.notifications.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- all
boolean
: Iftrue
, show notifications marked as read. - participating
boolean
: Iftrue
, only shows notifications in which the user is directly participating or mentioned. - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - before
string
: Only show notifications updated before the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items thread
repos.owner.repo.notifications.put
Marks all notifications in a repository as "read" removes them from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted
status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the List repository notifications for the authenticated user endpoint and pass the query parameter all=false
.
github.repos.owner.repo.notifications.put({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- last_read_at
string
: 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 format:YYYY-MM-DDTHH:MM:SSZ
. Default: The current timestamp.
- last_read_at
- owner required
Output
Output schema unknown
repos.owner.repo.pages.delete
Delete a GitHub Pages site
github.repos.owner.repo.pages.delete({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
Output schema unknown
repos.owner.repo.pages.get
Get a GitHub Pages site
github.repos.owner.repo.pages.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output page
repos.owner.repo.pages.post
Create a GitHub Pages site
github.repos.owner.repo.pages.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- source
object
- branch
string
(values: master, gh-pages): The repository branch used to publish your site's source files. Can be eithermaster
orgh-pages
. - path
string
: The repository directory that includes the source files for the Pages site. Whenbranch
ismaster
, you can changepath
to/docs
. Whenbranch
isgh-pages
, you are unable to specify apath
other than/
.
- branch
- source
- owner required
Output
- output page
repos.owner.repo.pages.put
Update information about a GitHub Pages site
github.repos.owner.repo.pages.put({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- cname
string
: Specify a custom domain for the repository. Sending anull
value will remove the custom domain. For more about custom domains, see "Using a custom domain with GitHub Pages."
- cname
- owner required
Output
Output schema unknown
repos.owner.repo.pages.builds.get
List GitHub Pages builds
github.repos.owner.repo.pages.builds.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items page-build
repos.owner.repo.pages.builds.post
You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.
Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.
github.repos.owner.repo.pages.builds.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output page-build-status
repos.owner.repo.pages.builds.latest.get
Get latest Pages build
github.repos.owner.repo.pages.builds.latest.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- owner required
Output
- output page-build
repos.owner.repo.pages.builds.build_id.get
Get GitHub Pages build
github.repos.owner.repo.pages.builds.build_id.get({
"owner": "",
"repo": "",
"build_id": 0
}, context)
Input
- input
object
- owner required
string
- repo required
string
- build_id required
integer
: build_id parameter
- owner required
Output
- output page-build
repos.owner.repo.projects.get
Lists the projects in a repository. Returns a 404 Not Found
status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
github.repos.owner.repo.projects.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- state
string
(values: open, closed, all): Indicates the state of the projects to return. Can be eitheropen
,closed
, orall
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items project
repos.owner.repo.projects.post
Creates a repository project board. Returns a 404 Not Found
status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized
or 410 Gone
status is returned.
github.repos.owner.repo.projects.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- body
string
: The description of the project. - name required
string
: The name of the project.
- body
- owner required
Output
- output project
repos.owner.repo.pulls.get
Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
github.repos.owner.repo.pulls.get({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- state
string
(values: open, closed, all): Eitheropen
,closed
, orall
to filter by state. - head
string
: Filter pulls by head user or head organization and branch name in the format ofuser:ref-name
ororganization:ref-name
. For example:github:new-script-format
oroctocat:test-branch
. - base
string
: Filter pulls by base branch name. Example:gh-pages
. - sort
string
(values: created, updated, popularity, long-running): What to sort results by. Can be eithercreated
,updated
,popularity
(comment count) orlong-running
(age, filtering by pulls updated in the last month). - direction
string
(values: asc, desc): The direction of the sort. Can be eitherasc
ordesc
. Default:desc
when sort iscreated
or sort is not specified, otherwiseasc
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- owner required
Output
- output
array
- items pull-request-simple
repos.owner.repo.pulls.post
Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
You can create a new pull request.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
github.repos.owner.repo.pulls.post({
"owner": "",
"repo": ""
}, context)
Input
- input
object
- owner required
string
- repo required
string
- body
object
- base **requ
- owner required