m/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." */ "packages/restore-package-version-for-authenticated-user": { parameters: { path: { package_type: components["parameters"]["package-type"]; package_name: components["parameters"]["package-name"]; package_version_id: components["parameters"]["package-version-id"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * Create a user project * @description Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ "projects/create-for-authenticated-user": { requestBody: { content: { "application/json": { /** * @description Name of the project * @example Week One Sprint */ name: string; /** * @description Body of the project * @example This project represents the sprint of the first week in January */ body?: string | null; }; }; }; responses: { /** @description Response */ 201: { content: { "application/json": components["schemas"]["project"]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 422: components["responses"]["validation_failed_simple"]; }; }; /** * List public email addresses for the authenticated user * @description Lists your publicly visible email address, which you can set with the * [Set primary email visibility for the authenticated user](https://docs.github.com/rest/users/emails#set-primary-email-visibility-for-the-authenticated-user) * endpoint. * * OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. */ "users/list-public-emails-for-authenticated-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["email"][]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * List repositories for the authenticated user * @description Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. * * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. */ "repos/list-for-authenticated-user": { parameters: { query?: { /** @description Limit results to repositories with the specified visibility. */ visibility?: "all" | "public" | "private"; /** * @description Comma-separated list of values. Can include: * * `owner`: Repositories that are owned by the authenticated user. * * `collaborator`: Repositories that the user has been added to as a collaborator. * * `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. */ affiliation?: string; /** @description Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ type?: "all" | "owner" | "public" | "private" | "member"; /** @description The property to sort the results by. */ sort?: "created" | "updated" | "pushed" | "full_name"; /** @description The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: "asc" | "desc"; per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; since?: components["parameters"]["since-repo-date"]; before?: components["parameters"]["before-repo-date"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["repository"][]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 422: components["responses"]["validation_failed"]; }; }; /** * Create a repository for the authenticated user * @description Creates a new repository for the authenticated user. * * OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. */ "repos/create-for-authenticated-user": { requestBody: { content: { "application/json": { /** * @description The name of the repository. * @example Team Environment */ name: string; /** @description A short description of the repository. */ description?: string; /** @description A URL with more information about the repository. */ homepage?: string; /** * @description Whether the repository is private. * @default false */ private?: boolean; /** * @description Whether issues are enabled. * @default true * @example true */ has_issues?: boolean; /** * @description Whether projects are enabled. * @default true * @example true */ has_projects?: boolean; /** * @description Whether the wiki is enabled. * @default true * @example true */ has_wiki?: boolean; /** * @description Whether discussions are enabled. * @default false * @example true */ has_discussions?: boolean; /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ team_id?: number; /** * @description Whether the repository is initialized with a minimal README. * @default false */ auto_init?: boolean; /** * @description The desired language or platform to apply to the .gitignore. * @example Haskell */ gitignore_template?: string; /** * @description The license keyword of the open source license for this repository. * @example mit */ license_template?: string; /** * @description Whether to allow squash merges for pull requests. * @default true * @example true */ allow_squash_merge?: boolean; /** * @description Whether to allow merge commits for pull requests. * @default true * @example true */ allow_merge_commit?: boolean; /** * @description Whether to allow rebase merges for pull requests. * @default true * @example true */ allow_rebase_merge?: boolean; /** * @description Whether to allow Auto-merge to be used on pull requests. * @default false * @example false */ allow_auto_merge?: boolean; /** * @description Whether to delete head branches when pull requests are merged * @default false * @example false */ delete_branch_on_merge?: boolean; /** * @description The default value for a squash merge commit title: * * - `PR_TITLE` - default to the pull request's title. * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). * @enum {string} */ squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; /** * @description The default value for a squash merge commit message: * * - `PR_BODY` - default to the pull request's body. * - `COMMIT_MESSAGES` - default to the branch's commit messages. * - `BLANK` - default to a blank commit message. * @enum {string} */ squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; /** * @description The default value for a merge commit title. * * - `PR_TITLE` - default to the pull request's title. * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). * @enum {string} */ merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; /** * @description The default value for a merge commit message. * * - `PR_TITLE` - default to the pull request's title. * - `PR_BODY` - default to the pull request's body. * - `BLANK` - default to a blank commit message. * @enum {string} */ merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; /** * @description Whether downloads are enabled. * @default true * @example true */ has_downloads?: boolean; /** * @description Whether this repository acts as a template that can be used to generate new repositories. * @default false * @example true */ is_template?: boolean; }; }; }; responses: { /** @description Response */ 201: { headers: { /** @example https://api.github.com/repos/octocat/Hello-World */ Location?: string; }; content: { "application/json": components["schemas"]["full-repository"]; }; }; 304: components["responses"]["not_modified"]; 400: components["responses"]["bad_request"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; 422: components["responses"]["validation_failed"]; }; }; /** * List repository invitations for the authenticated user * @description When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ "repos/list-invitations-for-authenticated-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["repository-invitation"][]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** Decline a repository invitation */ "repos/decline-invitation-for-authenticated-user": { parameters: { path: { invitation_id: components["parameters"]["invitation-id"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 304: components["responses"]["not_modified"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; 409: components["responses"]["conflict"]; }; }; /** Accept a repository invitation */ "repos/accept-invitation-for-authenticated-user": { parameters: { path: { invitation_id: components["parameters"]["invitation-id"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 304: components["responses"]["not_modified"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; 409: components["responses"]["conflict"]; }; }; /** * List social accounts for the authenticated user * @description Lists all of your social accounts. */ "users/list-social-accounts-for-authenticated-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["social-account"][]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * Add social accounts for the authenticated user * @description Add one or more social accounts to the authenticated user's profile. * * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. */ "users/add-social-account-for-authenticated-user": { requestBody: { content: { "application/json": { /** * @description Full URLs for the social media profiles to add. * @example [] */ account_urls: string[]; }; }; }; responses: { /** @description Response */ 201: { content: { "application/json": components["schemas"]["social-account"][]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; 422: components["responses"]["validation_failed"]; }; }; /** * Delete social accounts for the authenticated user * @description Deletes one or more social accounts from the authenticated user's profile. * * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. */ "users/delete-social-account-for-authenticated-user": { requestBody: { content: { "application/json": { /** * @description Full URLs for the social media profiles to delete. * @example [] */ account_urls: string[]; }; }; }; responses: { /** @description Response */ 204: { content: never; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; 422: components["responses"]["validation_failed"]; }; }; /** * List SSH signing keys for the authenticated user * @description Lists the SSH signing keys for the authenticated user's GitHub account. * * OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint. */ "users/list-ssh-signing-keys-for-authenticated-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["ssh-signing-key"][]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * Create a SSH signing key for the authenticated user * @description Creates an SSH signing key for the authenticated user's GitHub account. * * OAuth app tokens and personal access tokens (classic) need the `write:ssh_signing_key` scope to use this endpoint. */ "users/create-ssh-signing-key-for-authenticated-user": { requestBody: { content: { "application/json": { /** * @description A descriptive name for the new key. * @example Personal MacBook Air */ title?: string; /** @description The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." */ key: string; }; }; }; responses: { /** @description Response */ 201: { content: { "application/json": components["schemas"]["ssh-signing-key"]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; 422: components["responses"]["validation_failed"]; }; }; /** * Get an SSH signing key for the authenticated user * @description Gets extended details for an SSH signing key. * * OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint. */ "users/get-ssh-signing-key-for-authenticated-user": { parameters: { path: { ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["ssh-signing-key"]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * Delete an SSH signing key for the authenticated user * @description Deletes an SSH signing key from the authenticated user's GitHub account. * * OAuth app tokens and personal access tokens (classic) need the `admin:ssh_signing_key` scope to use this endpoint. */ "users/delete-ssh-signing-key-for-authenticated-user": { parameters: { path: { ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * List repositories starred by the authenticated user * @description Lists repositories the authenticated user has starred. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. */ "activity/list-repos-starred-by-authenticated-user": { parameters: { query?: { sort?: components["parameters"]["sort-starred"]; direction?: components["parameters"]["direction"]; per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["repository"][]; "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; }; }; /** * Check if a repository is starred by the authenticated user * @description Whether the authenticated user has starred the repository. */ "activity/check-repo-is-starred-by-authenticated-user": { parameters: { path: { owner: components["parameters"]["owner"]; repo: components["parameters"]["repo"]; }; }; responses: { /** @description Response if this repository is starred by you */ 204: { content: never; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; /** @description Not Found if this repository is not starred by you */ 404: { content: { "application/json": components["schemas"]["basic-error"]; }; }; }; }; /** * Star a repository for the authenticated user * @description Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." */ "activity/star-repo-for-authenticated-user": { parameters: { path: { owner: components["parameters"]["owner"]; repo: components["parameters"]["repo"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * Unstar a repository for the authenticated user * @description Unstar a repository that the authenticated user has previously starred. */ "activity/unstar-repo-for-authenticated-user": { parameters: { path: { owner: components["parameters"]["owner"]; repo: components["parameters"]["repo"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * List repositories watched by the authenticated user * @description Lists repositories the authenticated user is watching. */ "activity/list-watched-repos-for-authenticated-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["minimal-repository"][]; }; }; 304: components["responses"]["not_modified"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; }; }; /** * List teams for the authenticated user * @description List all of the teams across all of the organizations to which the authenticated * user belongs. * * OAuth app tokens and personal access tokens (classic) need the `user`, `repo`, or `read:org` scope to use this endpoint. * * When using a fine-grained personal access token, the resource owner of the token must be a single organization, and the response will only include the teams from that organization. */ "teams/list-for-authenticated-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["team-full"][]; }; }; 304: components["responses"]["not_modified"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * List users * @description Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. * * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. */ "users/list": { parameters: { query?: { since?: components["parameters"]["since-user"]; per_page?: components["parameters"]["per-page"]; }; }; responses: { /** @description Response */ 200: { headers: { /** @example ; rel="next" */ Link?: string; }; content: { "application/json": components["schemas"]["simple-user"][]; }; }; 304: components["responses"]["not_modified"]; }; }; /** * Get a user * @description Provides publicly available information about someone with a GitHub account. * * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication). * * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". */ "users/get-by-username": { parameters: { path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": | components["schemas"]["private-user"] | components["schemas"]["public-user"]; }; }; 404: components["responses"]["not_found"]; }; }; /** * Get list of conflicting packages during Docker migration for user * @description Lists all packages that are in a specific user's namespace, that the requesting user has access to, and that encountered a conflict during Docker migration. * * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. */ "packages/list-docker-migration-conflicting-packages-for-user": { parameters: { path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["package"][]; }; }; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; }; }; /** * List events for the authenticated user * @description If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ "activity/list-events-for-authenticated-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["event"][]; }; }; }; }; /** * List organization events for the authenticated user * @description This is the user's organization dashboard. You must be authenticated as the user to view this. */ "activity/list-org-events-for-authenticated-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; org: components["parameters"]["org"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["event"][]; }; }; }; }; /** List public events for a user */ "activity/list-public-events-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["event"][]; }; }; }; }; /** * List followers of a user * @description Lists the people following the specified user. */ "users/list-followers-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["simple-user"][]; }; }; }; }; /** * List the people a user follows * @description Lists the people who the specified user follows. */ "users/list-following-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["simple-user"][]; }; }; }; }; /** Check if a user follows another user */ "users/check-following-for-user": { parameters: { path: { username: components["parameters"]["username"]; target_user: string; }; }; responses: { /** @description if the user follows the target user */ 204: { content: never; }; /** @description if the user does not follow the target user */ 404: { content: never; }; }; }; /** * List gists for a user * @description Lists public gists for the specified user: */ "gists/list-for-user": { parameters: { query?: { since?: components["parameters"]["since"]; per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["base-gist"][]; }; }; 422: components["responses"]["validation_failed"]; }; }; /** * List GPG keys for a user * @description Lists the GPG keys for a user. This information is accessible by anyone. */ "users/list-gpg-keys-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["gpg-key"][]; }; }; }; }; /** * Get contextual information for a user * @description Provides hovercard information. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. * * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository). * * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ "users/get-context-for-user": { parameters: { query?: { /** @description Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. */ subject_type?: "organization" | "repository" | "issue" | "pull_request"; /** @description Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. */ subject_id?: string; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["hovercard"]; }; }; 404: components["responses"]["not_found"]; 422: components["responses"]["validation_failed"]; }; }; /** * Get a user installation for the authenticated app * @description Enables an authenticated GitHub App to find the user’s installation information. * * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ "apps/get-user-installation": { parameters: { path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["installation"]; }; }; }; }; /** * List public keys for a user * @description Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ "users/list-public-keys-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["key-simple"][]; }; }; }; }; /** * List organizations for a user * @description List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. */ "orgs/list-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["organization-simple"][]; }; }; }; }; /** * List packages for a user * @description Lists all packages in a user's namespace for which the requesting user has access. * * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." */ "packages/list-packages-for-user": { parameters: { query: { /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ package_type: | "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; visibility?: components["parameters"]["package-visibility"]; page?: components["parameters"]["page"]; per_page?: components["parameters"]["per-page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["package"][]; }; }; 400: components["responses"]["package_es_list_error"]; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; }; }; /** * Get a package for a user * @description Gets a specific package metadata for a public package owned by a user. * * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." */ "packages/get-package-for-user": { parameters: { path: { package_type: components["parameters"]["package-type"]; package_name: components["parameters"]["package-name"]; username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["package"]; }; }; }; }; /** * Delete a package for a user * @description Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. * * If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." * * OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." */ "packages/delete-package-for-user": { parameters: { path: { package_type: components["parameters"]["package-type"]; package_name: components["parameters"]["package-name"]; username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * Restore a package for a user * @description Restores an entire package for a user. * * You can restore a deleted package under the following conditions: * - The package was deleted within the last 30 days. * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. * * If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." * * OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." */ "packages/restore-package-for-user": { parameters: { query?: { /** @description package token */ token?: string; }; path: { package_type: components["parameters"]["package-type"]; package_name: components["parameters"]["package-name"]; username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * List package versions for a package owned by a user * @description Lists package versions for a public package owned by a specified user. * * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." */ "packages/get-all-package-versions-for-package-owned-by-user": { parameters: { path: { package_type: components["parameters"]["package-type"]; package_name: components["parameters"]["package-name"]; username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["package-version"][]; }; }; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * Get a package version for a user * @description Gets a specific package version for a public package owned by a specified user. * * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." */ "packages/get-package-version-for-user": { parameters: { path: { package_type: components["parameters"]["package-type"]; package_name: components["parameters"]["package-name"]; package_version_id: components["parameters"]["package-version-id"]; username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["package-version"]; }; }; }; }; /** * Delete package version for a user * @description Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. * * If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." * * OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." */ "packages/delete-package-version-for-user": { parameters: { path: { package_type: components["parameters"]["package-type"]; package_name: components["parameters"]["package-name"]; username: components["parameters"]["username"]; package_version_id: components["parameters"]["package-version-id"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * Restore package version for a user * @description Restores a specific package version for a user. * * You can restore a deleted package under the following conditions: * - The package was deleted within the last 30 days. * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. * * If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." * * OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." */ "packages/restore-package-version-for-user": { parameters: { path: { package_type: components["parameters"]["package-type"]; package_name: components["parameters"]["package-name"]; username: components["parameters"]["username"]; package_version_id: components["parameters"]["package-version-id"]; }; }; responses: { /** @description Response */ 204: { content: never; }; 401: components["responses"]["requires_authentication"]; 403: components["responses"]["forbidden"]; 404: components["responses"]["not_found"]; }; }; /** * List user projects * @description Lists projects for a user. */ "projects/list-for-user": { parameters: { query?: { /** @description Indicates the state of the projects to return. */ state?: "open" | "closed" | "all"; per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["project"][]; }; }; 422: components["responses"]["validation_failed"]; }; }; /** * List events received by the authenticated user * @description These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. */ "activity/list-received-events-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["event"][]; }; }; }; }; /** List public events received by a user */ "activity/list-received-public-events-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["event"][]; }; }; }; }; /** * List repositories for a user * @description Lists public repositories for the specified user. */ "repos/list-for-user": { parameters: { query?: { /** @description Limit results to repositories of the specified type. */ type?: "all" | "owner" | "member"; /** @description The property to sort the results by. */ sort?: "created" | "updated" | "pushed" | "full_name"; /** @description The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: "asc" | "desc"; per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["minimal-repository"][]; }; }; }; }; /** * Get GitHub Actions billing for a user * @description 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 returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". * * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. */ "billing/get-github-actions-billing-user": { parameters: { path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["actions-billing-usage"]; }; }; }; }; /** * Get GitHub Packages billing for a user * @description 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](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." * * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. */ "billing/get-github-packages-billing-user": { parameters: { path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["packages-billing-usage"]; }; }; }; }; /** * Get shared storage billing for a user * @description 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](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." * * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. */ "billing/get-shared-storage-billing-user": { parameters: { path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["combined-billing-usage"]; }; }; }; }; /** * List social accounts for a user * @description Lists social media accounts for a user. This endpoint is accessible by anyone. */ "users/list-social-accounts-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["social-account"][]; }; }; }; }; /** * List SSH signing keys for a user * @description Lists the SSH signing keys for a user. This operation is accessible by anyone. */ "users/list-ssh-signing-keys-for-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["ssh-signing-key"][]; }; }; }; }; /** * List repositories starred by a user * @description Lists repositories a user has starred. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. */ "activity/list-repos-starred-by-user": { parameters: { query?: { sort?: components["parameters"]["sort-starred"]; direction?: components["parameters"]["direction"]; per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": | components["schemas"]["starred-repository"][] | components["schemas"]["repository"][]; }; }; }; }; /** * List repositories watched by a user * @description Lists repositories a user is watching. */ "activity/list-repos-watched-by-user": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { username: components["parameters"]["username"]; }; }; responses: { /** @description Response */ 200: { headers: { Link: components["headers"]["link"]; }; content: { "application/json": components["schemas"]["minimal-repository"][]; }; }; }; }; /** * Get all API versions * @description Get all supported GitHub API versions. */ "meta/get-all-versions": { responses: { /** @description Response */ 200: { content: { "application/json": string[]; }; }; 404: components["responses"]["not_found"]; }; }; /** * Get the Zen of GitHub * @description Get a random sentence from the Zen of GitHub */ "meta/get-zen": { responses: { /** @description Response */ 200: { content: { "application/json": string; }; }; }; }; /** * Compare two commits * @description **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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 `: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](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) 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** * * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." * * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. * * **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: * * | Name | Type | Description | * | ---- | ---- | ----------- | * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * * 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. | */ "repos/compare-commits": { parameters: { query?: { per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; path: { owner: components["parameters"]["owner"]; repo: components["parameters"]["repo"]; base: string; head: string; }; }; responses: { /** @description Response */ 200: { content: { "application/json": components["schemas"]["commit-comparison"]; }; }; 404: components["responses"]["not_found"]; 500: components["responses"]["internal_error"]; }; }; }