openapi: 3.1.0 info: version: 1.1.4 title: github-repos-api description: |- Use the REST API to create, manage and control the workflow of public and private GitHub repositories. license: name: MIT url: https://spdx.org/licenses/MIT termsOfService: https://docs.github.com/articles/github-terms-of-service contact: name: Support url: https://support.github.com/contact servers: - url: '{protocol}://{hostname}' variables: hostname: description: Self-hosted Enterprise Server hostname default: api.github.com protocol: description: Self-hosted Enterprise Server protocol default: https externalDocs: description: GitHub Enterprise Developer Docs url: https://docs.github.com/enterprise-server@3.9/rest/ tags: - name: Access - name: Add - name: Administrative - name: All - name: Applications - name: Branches - name: Checks - name: Commits - name: Contexts - name: Create - name: Delete - name: Get - name: Protected - name: Protections - name: Pull - name: Remove - name: Rename - name: Requests - name: Restrictions - name: Reviews - name: Sets - name: Signatures - name: Status - name: Teams - name: Update - name: Users paths: /repos/{owner}/{repo}/branches/{branch}: get: summary: GitHub Get Branch description: |- The Get Branch endpoint retrieves detailed information about a specific branch in a GitHub repository. By making a GET request to /repos/{owner}/{repo}/branches/{branch}, you can access comprehensive data about the branch including its name, commit SHA, protection status, and associated metadata. This operation requires you to provide the repository owner's username, the repository name, and the specific branch name as path parameters. The response includes the branch's latest commit information, protection rules if enabled, and links to related resources. This endpoint is particularly useful for verifying branch existence, checking protection settings, or retrieving the current commit reference before performing operations like merges or deployments. tags: - Branches - Get operationId: getBranch externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branches#get-a-branch parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/branch-with-protection' examples: default: $ref: '#/components/examples/branch-get' '301': $ref: '#/components/responses/moved_permanently' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branches security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection: get: summary: GitHub Get Branch Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Branches - Get - Protections operationId: getBranchProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-branch-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/branch-protection' examples: default: $ref: '#/components/examples/branch-protection' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK put: summary: GitHub Update Branch Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. tags: - Branches - Protections - Update operationId: updateBranchProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#update-branch-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: true content: application/json: schema: type: object properties: required_status_checks: type: object description: |- Require status checks to pass before merging. Set to `null` to disable. properties: strict: type: boolean description: Require branches to be up to date before merging. contexts: type: array deprecated: true description: | **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. items: type: string checks: type: array description: |- The list of status checks to require in order to merge into this branch. items: type: object required: - context properties: context: type: string description: The name of the required check app_id: type: integer description: |- The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. required: - strict - contexts enforce_admins: type: boolean description: |- Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. required_pull_request_reviews: type: object description: |- Require at least one approving review on a pull request, before merging. Set to `null` to disable. properties: dismissal_restrictions: type: object description: |- Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. properties: users: type: array description: The list of user `login`s with dismissal access items: type: string teams: type: array description: The list of team `slug`s with dismissal access items: type: string apps: type: array description: The list of app `slug`s with dismissal access items: type: string dismiss_stale_reviews: type: boolean description: |- Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. require_code_owner_reviews: type: boolean description: |- Blocks merging pull requests until [code owners](https://docs.github.com/enterprise-server@3.9/articles/about-code-owners/) review them. required_approving_review_count: type: integer description: |- Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. require_last_push_approval: type: boolean description: |- Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. default: false bypass_pull_request_allowances: type: object description: |- Allow specific users, teams, or apps to bypass pull request requirements. properties: users: type: array description: |- The list of user `login`s allowed to bypass pull request requirements. items: type: string teams: type: array description: |- The list of team `slug`s allowed to bypass pull request requirements. items: type: string apps: type: array description: |- The list of app `slug`s allowed to bypass pull request requirements. items: type: string restrictions: type: object description: |- Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. properties: users: type: array description: The list of user `login`s with push access items: type: string teams: type: array description: The list of team `slug`s with push access items: type: string apps: type: array description: The list of app `slug`s with push access items: type: string required: - users - teams required_linear_history: type: boolean description: |- Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/enterprise-server@3.9/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. allow_force_pushes: type: boolean description: |- Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/enterprise-server@3.9/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." allow_deletions: type: boolean description: |- Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/enterprise-server@3.9/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. block_creations: type: boolean description: |- If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. required_conversation_resolution: type: boolean description: |- Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. lock_branch: type: boolean description: |- Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. default: false allow_fork_syncing: type: boolean description: |- Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. default: false required: - required_status_checks - enforce_admins - required_pull_request_reviews - restrictions examples: default: value: required_status_checks: strict: true contexts: - continuous-integration/travis-ci enforce_admins: true required_pull_request_reviews: dismissal_restrictions: users: - octocat teams: - justice-league dismiss_stale_reviews: true require_code_owner_reviews: true required_approving_review_count: 2 require_last_push_approval: true bypass_pull_request_allowances: users: - octocat teams: - justice-league restrictions: users: - octocat teams: - justice-league apps: - super-ci required_linear_history: true allow_force_pushes: true allow_deletions: true block_creations: true required_conversation_resolution: true lock_branch: true allow_fork_syncing: true responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/protected-branch' examples: default: $ref: '#/components/examples/branch-protection-update' '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/not_found' '422': $ref: '#/components/responses/validation_failed_simple' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Delete Branch Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Branches - Delete - Protections operationId: deleteBranchProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#delete-branch-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '204': description: Response '403': $ref: '#/components/responses/forbidden' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins: get: summary: GitHub Get Admin Branch Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Administrative - Branches - Get - Protections operationId: getAdminBranchProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-admin-branch-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/protected-branch-admin-enforced' examples: default: $ref: '#/components/examples/protected-branch-admin-enforced-2' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK post: summary: GitHub Set Admin Branch Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. tags: - Administrative - Branches - Protections - Sets operationId: setAdminBranchProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#set-admin-branch-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/protected-branch-admin-enforced' examples: default: $ref: '#/components/examples/protected-branch-admin-enforced-2' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Delete Admin Branch Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. tags: - Administrative - Branches - Delete - Protections operationId: deleteAdminBranchProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#delete-admin-branch-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '204': description: Response '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews: get: summary: GitHub Get Pull Request Review Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Get - Protections - Pull - Requests - Reviews operationId: getPullRequestReviewProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-pull-request-review-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/protected-branch-pull-request-review' examples: default: $ref: '#/components/examples/protected-branch-pull-request-review' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK patch: summary: GitHub Update Pull Request Review Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. tags: - Protections - Pull - Requests - Reviews - Update operationId: updatePullRequestReviewProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#update-pull-request-review-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: type: object properties: dismissal_restrictions: type: object description: |- Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. properties: users: type: array description: The list of user `login`s with dismissal access items: type: string teams: type: array description: The list of team `slug`s with dismissal access items: type: string apps: type: array description: The list of app `slug`s with dismissal access items: type: string dismiss_stale_reviews: type: boolean description: |- Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. require_code_owner_reviews: type: boolean description: |- Blocks merging pull requests until [code owners](https://docs.github.com/enterprise-server@3.9/articles/about-code-owners/) have reviewed. required_approving_review_count: type: integer description: |- Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. require_last_push_approval: type: boolean description: |- Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` default: false bypass_pull_request_allowances: type: object description: |- Allow specific users, teams, or apps to bypass pull request requirements. properties: users: type: array description: |- The list of user `login`s allowed to bypass pull request requirements. items: type: string teams: type: array description: |- The list of team `slug`s allowed to bypass pull request requirements. items: type: string apps: type: array description: |- The list of app `slug`s allowed to bypass pull request requirements. items: type: string examples: default: value: dismissal_restrictions: users: - octocat teams: - justice-league apps: - octoapp bypass_pull_request_allowances: users: - octocat teams: - justice-league apps: - octoapp dismiss_stale_reviews: true require_code_owner_reviews: true required_approving_review_count: 2 require_last_push_approval: true responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/protected-branch-pull-request-review' examples: default: $ref: '#/components/examples/protected-branch-pull-request-review' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Delete Pull Request Review Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Delete - Protections - Pull - Requests - Reviews operationId: deletePullRequestReviewProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#delete-pull-request-review-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '204': description: Response '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures: get: summary: GitHub Get Commit Signature Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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](https://docs.github.com/enterprise-server@3.9/articles/signing-commits-with-gpg) in GitHub Help. **Note**: You must enable branch protection to require signed commits. tags: - Commits - Get - Protections - Signatures operationId: getCommitSignatureProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-commit-signature-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/protected-branch-admin-enforced' examples: default: $ref: '#/components/examples/protected-branch-admin-enforced' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK post: summary: GitHub Create Commit Signature Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. tags: - Commits - Create - Protections - Signatures operationId: createCommitSignatureProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#create-commit-signature-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/protected-branch-admin-enforced' examples: default: $ref: '#/components/examples/protected-branch-admin-enforced' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Delete Commit Signature Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. tags: - Commits - Delete - Protections - Signatures operationId: deleteCommitSignatureProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#delete-commit-signature-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '204': description: Response '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks: get: summary: GitHub Get Status Checks Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Checks - Get - Protections - Status operationId: getStatusChecksProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-status-checks-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/status-check-policy' examples: default: $ref: '#/components/examples/status-check-policy' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK patch: summary: GitHub Update Status Check Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. tags: - Checks - Protections - Status - Update operationId: updateStatusCheckProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#update-status-check-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: type: object properties: strict: type: boolean description: Require branches to be up to date before merging. contexts: type: array deprecated: true description: | **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. items: type: string checks: type: array description: |- The list of status checks to require in order to merge into this branch. items: type: object required: - context properties: context: type: string description: The name of the required check app_id: type: integer description: |- The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. examples: default: value: strict: true contexts: - continuous-integration/travis-ci responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/status-check-policy' examples: default: $ref: '#/components/examples/status-check-policy' '404': $ref: '#/components/responses/not_found' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Remove Status Check Protection description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Checks - Protections - Remove - Status operationId: removeStatusCheckProtection externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#remove-status-check-protection parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '204': description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts: get: summary: GitHub Get All Status Check Contexts description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - All - Checks - Contexts - Get - Status operationId: getAllStatusCheckContexts externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-all-status-check-contexts parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: type: array items: type: string examples: default: value: - continuous-integration/travis-ci '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK post: summary: GitHub Add Status Check Contexts description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Add - Checks - Contexts - Status operationId: addStatusCheckContexts externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#add-status-check-contexts parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: oneOf: - type: object properties: contexts: type: array description: The name of the status checks items: type: string required: - contexts example: contexts: - contexts - type: array description: The name of the status checks items: type: string examples: default: summary: Example adding status checks to a branch protection rule value: contexts: - continuous-integration/travis-ci - continuous-integration/jenkins responses: '200': description: Response content: application/json: schema: type: array items: type: string examples: default: value: - continuous-integration/travis-ci - continuous-integration/jenkins '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/not_found' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: contexts category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK put: summary: GitHub Set Status Check Contexts description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Checks - Contexts - Sets - Status operationId: setStatusCheckContexts externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#set-status-check-contexts parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: oneOf: - type: object properties: contexts: type: array description: The name of the status checks items: type: string required: - contexts example: contexts: - contexts - type: array description: The name of the status checks items: type: string examples: default: summary: Example updating status checks for a branch protection rule value: contexts: - continuous-integration/travis-ci responses: '200': description: Response content: application/json: schema: type: array items: type: string examples: default: value: - continuous-integration/travis-ci '404': $ref: '#/components/responses/not_found' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: contexts category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Remove Status Check Contexts description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - Checks - Contexts - Remove - Status operationId: removeStatusCheckContexts externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#remove-status-check-contexts parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: content: application/json: schema: oneOf: - type: object properties: contexts: type: array description: The name of the status checks items: type: string required: - contexts example: contexts: - contexts - type: array description: The name of the status checks items: type: string examples: default: summary: Example removing status checks from a branch protection rule value: contexts: - continuous-integration/jenkins responses: '200': description: Response content: application/json: schema: type: array items: type: string examples: default: value: - continuous-integration/travis-ci '404': $ref: '#/components/responses/not_found' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: contexts category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection/restrictions: get: summary: GitHub Get Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. tags: - Access - Get - Restrictions operationId: getAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/branch-restriction-policy' examples: default: $ref: '#/components/examples/branch-restriction-policy' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Delete Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Disables the ability to restrict who can push to this branch. tags: - Access - Delete - Restrictions operationId: deleteAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#delete-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '204': description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps: get: summary: GitHub Get Apps with Access to the Protected Branch description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Lists the GitHub Apps that have push access to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. tags: - Access - Applications - Branches - Get - Protected operationId: getAppsWithAccessToTheProtectedBranch externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-apps-with-access-to-the-protected-branch parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/integration' examples: default: $ref: '#/components/examples/integration-items' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK post: summary: GitHub Add App Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Grants the specified apps push access for this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. tags: - Access - Add - Applications - Restrictions operationId: addAppAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#add-app-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: oneOf: - type: object properties: apps: type: array description: |- The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. items: type: string required: - apps example: apps: - my-app - type: array items: type: string examples: default: value: apps: - octoapp responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/integration' examples: default: $ref: '#/components/examples/integration-items' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: apps category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK put: summary: GitHub Set App Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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 GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. tags: - Access - Applications - Restrictions - Sets operationId: setAppAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#set-app-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: oneOf: - type: object properties: apps: type: array description: |- The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. items: type: string required: - apps example: apps: - my-app - type: array items: type: string examples: default: value: apps: - octoapp responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/integration' examples: default: $ref: '#/components/examples/integration-items' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: apps category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Remove App Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Removes the ability of an app to push to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. tags: - Access - Applications - Remove - Restrictions operationId: removeAppAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#remove-app-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: content: application/json: schema: oneOf: - type: object properties: apps: type: array description: |- The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. items: type: string required: - apps example: apps: - my-app - type: array items: type: string examples: default: value: apps: - my-app responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/integration' examples: default: $ref: '#/components/examples/integration-items' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: apps category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams: get: summary: GitHub Get Teams with Access to the Protected Branch description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Lists the teams who have push access to this branch. The list includes child teams. tags: - Access - Branches - Get - Protected - Teams operationId: getTeamsWithAccessToTheProtectedBranch externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-teams-with-access-to-the-protected-branch parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/team' examples: default: $ref: '#/components/examples/team-items' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK post: summary: GitHub Add Team Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Grants the specified teams push access for this branch. You can also give push access to child teams. tags: - Access - Add - Restrictions - Teams operationId: addTeamAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#add-team-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: oneOf: - type: object properties: teams: type: array description: The slug values for teams items: type: string required: - teams example: teams: - my-team - type: array description: The slug values for teams items: type: string examples: default: summary: Example adding a team in a branch protection rule value: teams: - justice-league responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/team' examples: default: $ref: '#/components/examples/team-items' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: teams category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK put: summary: GitHub Set Team Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. tags: - Access - Restrictions - Sets - Teams operationId: setTeamAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#set-team-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: oneOf: - type: object properties: teams: type: array description: The slug values for teams items: type: string required: - teams example: teams: - justice-league - type: array description: The slug values for teams items: type: string examples: default: summary: Example replacing a team in a branch protection rule value: teams: - justice-league responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/team' examples: default: $ref: '#/components/examples/team-items' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: teams category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Remove Team Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. tags: - Access - Remove - Restrictions - Teams operationId: removeTeamAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#remove-team-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: content: application/json: schema: oneOf: - type: object properties: teams: type: array description: The slug values for teams items: type: string required: - teams example: teams: - my-team - type: array description: The slug values for teams items: type: string examples: default: summary: Example removing a team in a branch protection rule value: teams: - octocats responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/team' examples: default: $ref: '#/components/examples/team-items' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: teams category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users: get: summary: GitHub Get Users with Access to the Protected Branch description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Lists the people who have push access to this branch. tags: - Access - Branches - Get - Protected - Users operationId: getUsersWithAccessToTheProtectedBranch externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-users-with-access-to-the-protected-branch parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/simple-user' examples: default: $ref: '#/components/examples/simple-user-items' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK post: summary: GitHub Add User Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. | tags: - Access - Add - Restrictions - Users operationId: addUserAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#add-user-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: oneOf: - type: object properties: users: type: array description: The username for users items: type: string required: - users example: users: - mona - type: array items: type: string examples: default: summary: Example adding a user in a branch protection rule value: users: - octocat responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/simple-user' examples: default: $ref: '#/components/examples/simple-user-items' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: users category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK put: summary: GitHub Set User Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. | tags: - Access - Restrictions - Sets - Users operationId: setUserAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#set-user-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: false content: application/json: schema: oneOf: - type: object properties: users: type: array description: The username for users items: type: string required: - users example: users: - mona - type: array items: type: string examples: default: summary: Example replacing a user in a branch protection rule value: users: - octocat responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/simple-user' examples: default: $ref: '#/components/examples/simple-user-items' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: users category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Remove User Access Restrictions description: |- 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](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-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. | tags: - Access - Remove - Restrictions - Users operationId: removeUserAccessRestrictions externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#remove-user-access-restrictions parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: content: application/json: schema: oneOf: - type: object properties: users: type: array description: The username for users items: type: string required: - users example: users: - mona - type: array items: type: string examples: default: summary: Example removing a user in a branch protection rule value: users: - octocat responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/simple-user' examples: default: $ref: '#/components/examples/simple-user-items' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true requestBodyParameterName: users category: branches subcategory: branch-protection security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/branches/{branch}/rename: post: summary: GitHub Rename Branch description: |- Renames a branch in a repository. **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/enterprise-server@3.9/github/administering-a-repository/renaming-a-branch)". The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. In order to rename the default branch, fine-grained access tokens also need the `administration:write` repository permission. tags: - Branches - Rename operationId: renameBranch externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/branches/branches#rename-a-branch parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/branch' - in: header name: Authorization schema: type: string example: example_value - in: header name: X-GitHub-Api-Version schema: type: string default: '2022-11-28' example: example_value - in: header name: Accept schema: type: string default: application/vnd.github+json example: example_value requestBody: required: true content: application/json: schema: type: object properties: new_name: type: string description: The new name of the branch. required: - new_name examples: default: value: new_name: my_renamed_branch responses: '201': description: Response content: application/json: schema: $ref: '#/components/schemas/branch-with-protection' examples: default: $ref: '#/components/examples/branch-with-protection' '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/not_found' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true category: branches subcategory: branches security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: nullable-simple-user: title: Simple User description: GitHub user. type: object properties: name: type: string example: octocat email: type: string example: octocat@github.com login: type: string example: octocat id: type: integer format: int64 example: 1 node_id: type: string example: MDQ6VXNlcjE= avatar_url: type: string format: uri example: https://github.com/images/error/octocat_happy.gif gravatar_id: type: string example: 41d064eb2195891e12d0413f63227ea7 url: type: string format: uri example: https://api.github.com/users/octocat html_url: type: string format: uri example: https://github.com/octocat followers_url: type: string format: uri example: https://api.github.com/users/octocat/followers following_url: type: string example: https://api.github.com/users/octocat/following{/other_user} gists_url: type: string example: https://api.github.com/users/octocat/gists{/gist_id} starred_url: type: string example: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: type: string format: uri example: https://api.github.com/users/octocat/subscriptions organizations_url: type: string format: uri example: https://api.github.com/users/octocat/orgs repos_url: type: string format: uri example: https://api.github.com/users/octocat/repos events_url: type: string example: https://api.github.com/users/octocat/events{/privacy} received_events_url: type: string format: uri example: https://api.github.com/users/octocat/received_events type: type: string example: User site_admin: type: boolean example: true starred_at: type: string example: '"2020-07-09T00:17:55Z"' required: - avatar_url - events_url - followers_url - following_url - gists_url - gravatar_id - html_url - id - node_id - login - organizations_url - received_events_url - repos_url - site_admin - starred_url - subscriptions_url - type - url simple-user: title: Simple User description: GitHub user. type: object properties: name: type: string example: octocat email: type: string example: octocat@github.com login: type: string example: octocat id: type: integer format: int64 example: 1 node_id: type: string example: MDQ6VXNlcjE= avatar_url: type: string format: uri example: https://github.com/images/error/octocat_happy.gif gravatar_id: type: string example: 41d064eb2195891e12d0413f63227ea7 url: type: string format: uri example: https://api.github.com/users/octocat html_url: type: string format: uri example: https://github.com/octocat followers_url: type: string format: uri example: https://api.github.com/users/octocat/followers following_url: type: string example: https://api.github.com/users/octocat/following{/other_user} gists_url: type: string example: https://api.github.com/users/octocat/gists{/gist_id} starred_url: type: string example: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: type: string format: uri example: https://api.github.com/users/octocat/subscriptions organizations_url: type: string format: uri example: https://api.github.com/users/octocat/orgs repos_url: type: string format: uri example: https://api.github.com/users/octocat/repos events_url: type: string example: https://api.github.com/users/octocat/events{/privacy} received_events_url: type: string format: uri example: https://api.github.com/users/octocat/received_events type: type: string example: User site_admin: type: boolean example: true starred_at: type: string example: '"2020-07-09T00:17:55Z"' required: - avatar_url - events_url - followers_url - following_url - gists_url - gravatar_id - html_url - id - node_id - login - organizations_url - received_events_url - repos_url - site_admin - starred_url - subscriptions_url - type - url integration: title: GitHub app description: |- GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. type: object properties: id: description: Unique identifier of the GitHub app example: 37 type: integer slug: description: The slug name of the GitHub app example: probot-owners type: string node_id: type: string example: MDExOkludGVncmF0aW9uMQ== owner: $ref: '#/components/schemas/nullable-simple-user' name: description: The name of the GitHub app example: Probot Owners type: string description: type: string example: The description of the app. external_url: type: string format: uri example: https://example.com html_url: type: string format: uri example: https://github.com/apps/super-ci created_at: type: string format: date-time example: '2017-07-08T16:18:44-04:00' updated_at: type: string format: date-time example: '2017-07-08T16:18:44-04:00' permissions: description: The set of permissions for the GitHub app type: object properties: issues: type: string checks: type: string metadata: type: string contents: type: string deployments: type: string additionalProperties: type: string example: issues: read deployments: write events: description: The list of events for the GitHub app example: - label - deployment type: array items: type: string installations_count: description: The number of installations associated with the GitHub app example: 5 type: integer client_id: type: string example: '"Iv1.25b5d1e65ffc4022"' client_secret: type: string example: '"1d4b2097ac622ba702d19de498f005747a8b21d3"' webhook_secret: type: string example: '"6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b"' pem: type: string example: |- "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" required: - id - node_id - owner - name - description - external_url - html_url - created_at - updated_at - permissions - events basic-error: title: Basic Error description: Basic Error type: object properties: message: type: string example: Example body text documentation_url: type: string example: https://api.github.com/repos/octocat/Hello-World url: type: string example: https://api.github.com/repos/octocat/Hello-World status: type: string example: open validation-error-simple: title: Validation Error Simple description: Validation Error Simple type: object required: - message - documentation_url properties: message: type: string example: Example body text documentation_url: type: string example: https://api.github.com/repos/octocat/Hello-World errors: type: array items: type: string validation-error: title: Validation Error description: Validation Error type: object required: - message - documentation_url properties: message: type: string example: Example body text documentation_url: type: string example: https://api.github.com/repos/octocat/Hello-World errors: type: array items: type: object required: - code properties: resource: type: string field: type: string message: type: string code: type: string index: type: integer value: oneOf: - type: string - type: integer - type: array items: type: string empty-object: title: Empty Object description: An object without any properties. type: object additionalProperties: false nullable-team-simple: title: Team Simple description: |- Groups of organization members that gives permissions on specified repositories. type: object properties: id: description: Unique identifier of the team type: integer example: 1 node_id: type: string example: MDQ6VGVhbTE= url: description: URL for the team type: string format: uri example: https://api.github.com/organizations/1/team/1 members_url: type: string example: https://api.github.com/organizations/1/team/1/members{/member} name: description: Name of the team type: string example: Justice League description: description: Description of the team type: string example: great team. permission: description: Permission that the team will have for its repositories type: string example: admin privacy: description: The level of privacy this team should have type: string example: closed html_url: type: string format: uri example: https://github.com/orgs/rails/teams/core repositories_url: type: string format: uri example: https://api.github.com/organizations/1/team/1/repos slug: type: string example: justice-league ldap_dn: description: Distinguished Name (DN) that team maps to within LDAP environment example: uid=example,ou=users,dc=github,dc=com type: string required: - id - node_id - url - members_url - name - description - permission - html_url - repositories_url - slug team: title: Team description: |- Groups of organization members that gives permissions on specified repositories. type: object properties: id: type: integer example: 42 node_id: type: string example: '12345678' name: type: string example: octocat slug: type: string example: example_value description: type: string example: This is an example repository privacy: type: string example: example_value permission: type: string example: example_value permissions: type: object properties: pull: type: boolean triage: type: boolean push: type: boolean maintain: type: boolean admin: type: boolean required: - pull - triage - push - maintain - admin url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World html_url: type: string format: uri example: https://github.com/orgs/rails/teams/core members_url: type: string example: https://api.github.com/repos/octocat/Hello-World repositories_url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World parent: $ref: '#/components/schemas/nullable-team-simple' required: - id - node_id - url - members_url - name - description - permission - html_url - repositories_url - slug - parent protected-branch-required-status-check: title: Protected Branch Required Status Check description: Protected Branch Required Status Check type: object properties: url: type: string example: https://api.github.com/repos/octocat/Hello-World enforcement_level: type: string example: example_value contexts: type: array items: type: string checks: type: array items: type: object properties: context: type: string app_id: type: integer required: - context - app_id contexts_url: type: string example: https://api.github.com/repos/octocat/Hello-World strict: type: boolean example: true required: - contexts - checks protected-branch-admin-enforced: title: Protected Branch Admin Enforced description: Protected Branch Admin Enforced type: object properties: url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins enabled: type: boolean example: true required: - url - enabled protected-branch-pull-request-review: title: Protected Branch Pull Request Review description: Protected Branch Pull Request Review type: object properties: url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions dismissal_restrictions: type: object properties: users: description: The list of users with review dismissal access. type: array items: $ref: '#/components/schemas/simple-user' teams: description: The list of teams with review dismissal access. type: array items: $ref: '#/components/schemas/team' apps: description: The list of apps with review dismissal access. type: array items: $ref: '#/components/schemas/integration' url: type: string example: |- "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" users_url: type: string example: |- "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" teams_url: type: string example: |- "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" bypass_pull_request_allowances: type: object description: |- Allow specific users, teams, or apps to bypass pull request requirements. properties: users: description: The list of users allowed to bypass pull request requirements. type: array items: $ref: '#/components/schemas/simple-user' teams: description: The list of teams allowed to bypass pull request requirements. type: array items: $ref: '#/components/schemas/team' apps: description: The list of apps allowed to bypass pull request requirements. type: array items: $ref: '#/components/schemas/integration' dismiss_stale_reviews: type: boolean example: true require_code_owner_reviews: type: boolean example: true required_approving_review_count: type: integer minimum: 0 maximum: 6 example: 2 require_last_push_approval: description: |- Whether the most recent push must be approved by someone other than the person who pushed it. type: boolean example: true default: false required: - dismiss_stale_reviews - require_code_owner_reviews branch-restriction-policy: title: Branch Restriction Policy description: Branch Restriction Policy type: object properties: url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World users_url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World teams_url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World apps_url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World users: type: array items: type: object properties: login: type: string id: type: integer format: int64 node_id: type: string avatar_url: type: string gravatar_id: type: string url: type: string html_url: type: string followers_url: type: string following_url: type: string gists_url: type: string starred_url: type: string subscriptions_url: type: string organizations_url: type: string repos_url: type: string events_url: type: string received_events_url: type: string type: type: string site_admin: type: boolean teams: type: array items: type: object properties: id: type: integer node_id: type: string url: type: string html_url: type: string name: type: string slug: type: string description: type: string privacy: type: string permission: type: string members_url: type: string repositories_url: type: string parent: type: string apps: type: array items: type: object properties: id: type: integer slug: type: string node_id: type: string owner: type: object properties: login: type: string id: type: integer node_id: type: string url: type: string repos_url: type: string events_url: type: string hooks_url: type: string issues_url: type: string members_url: type: string public_members_url: type: string avatar_url: type: string description: type: string gravatar_id: type: string example: '""' html_url: type: string example: '"https://github.com/testorg-ea8ec76d71c3af4b"' followers_url: type: string example: |- "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" following_url: type: string example: |- "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" gists_url: type: string example: |- "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" starred_url: type: string example: |- "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" subscriptions_url: type: string example: |- "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" organizations_url: type: string example: |- "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" received_events_url: type: string example: |- "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" type: type: string example: '"Organization"' site_admin: type: boolean example: false name: type: string description: type: string external_url: type: string html_url: type: string created_at: type: string updated_at: type: string permissions: type: object properties: metadata: type: string contents: type: string issues: type: string single_file: type: string events: type: array items: type: string required: - url - users_url - teams_url - apps_url - users - teams - apps branch-protection: title: Branch Protection description: Branch Protection type: object properties: url: type: string example: https://api.github.com/repos/octocat/Hello-World enabled: type: boolean example: true required_status_checks: $ref: '#/components/schemas/protected-branch-required-status-check' enforce_admins: $ref: '#/components/schemas/protected-branch-admin-enforced' required_pull_request_reviews: $ref: '#/components/schemas/protected-branch-pull-request-review' restrictions: $ref: '#/components/schemas/branch-restriction-policy' required_linear_history: type: object properties: enabled: type: boolean allow_force_pushes: type: object properties: enabled: type: boolean allow_deletions: type: object properties: enabled: type: boolean block_creations: type: object properties: enabled: type: boolean required_conversation_resolution: type: object properties: enabled: type: boolean name: type: string example: '"branch/with/protection"' protection_url: type: string example: |- "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" required_signatures: type: object properties: url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures enabled: type: boolean example: true required: - url - enabled lock_branch: type: object description: |- Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. properties: enabled: default: false type: boolean allow_fork_syncing: type: object description: |- Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. properties: enabled: default: false type: boolean nullable-git-user: title: Git User description: Metaproperties for Git author/committer information. type: object properties: name: type: string example: '"Chris Wanstrath"' email: type: string example: '"chris@ozmm.org"' date: type: string example: '"2007-10-29T02:42:39.000-07:00"' verification: title: Verification type: object properties: verified: type: boolean example: true reason: type: string example: example_value payload: type: string example: example_value signature: type: string example: example_value required: - verified - reason - payload - signature diff-entry: title: Diff Entry description: Diff Entry type: object properties: sha: type: string example: bbcd538c8e72b8c175046e27cc8f907076331401 filename: type: string example: file1.txt status: type: string enum: - added - removed - modified - renamed - copied - changed - unchanged example: added additions: type: integer example: 103 deletions: type: integer example: 21 changes: type: integer example: 124 blob_url: type: string format: uri example: |- https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt raw_url: type: string format: uri example: |- https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt contents_url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e patch: type: string example: '@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test' previous_filename: type: string example: file.txt required: - additions - blob_url - changes - contents_url - deletions - filename - raw_url - sha - status commit: title: Commit description: Commit type: object properties: url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e sha: type: string example: 6dcb09b5b57875f334f61aebed695e2e4193db5e node_id: type: string example: MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== html_url: type: string format: uri example: |- https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e comments_url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments commit: type: object properties: url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e author: $ref: '#/components/schemas/nullable-git-user' committer: $ref: '#/components/schemas/nullable-git-user' message: type: string example: Fix all the bugs comment_count: type: integer example: 0 tree: type: object properties: sha: type: string example: 827efc6d56897b048c772eb4087f854f46256132 url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 required: - sha - url verification: $ref: '#/components/schemas/verification' required: - author - committer - comment_count - message - tree - url author: oneOf: - $ref: '#/components/schemas/simple-user' - $ref: '#/components/schemas/empty-object' example: example_value committer: oneOf: - $ref: '#/components/schemas/simple-user' - $ref: '#/components/schemas/empty-object' example: example_value parents: type: array items: type: object properties: sha: type: string example: 7638417db6d59f3c431d3e1f261cc637155684cd url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd html_url: type: string format: uri example: |- https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd required: - sha - url stats: type: object properties: additions: type: integer deletions: type: integer total: type: integer files: type: array items: $ref: '#/components/schemas/diff-entry' required: - url - sha - node_id - html_url - comments_url - commit - author - committer - parents branch-with-protection: title: Branch With Protection description: Branch With Protection type: object properties: name: type: string example: octocat commit: $ref: '#/components/schemas/commit' _links: type: object properties: html: type: string self: type: string format: uri required: - html - self protected: type: boolean example: true protection: $ref: '#/components/schemas/branch-protection' protection_url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World pattern: type: string example: '"mas*"' required_approving_review_count: type: integer example: 1 required: - name - commit - _links - protection - protected - protection_url status-check-policy: title: Status Check Policy description: Status Check Policy type: object properties: url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks strict: type: boolean example: true contexts: type: array example: - continuous-integration/travis-ci items: type: string checks: type: array items: type: object properties: context: type: string example: continuous-integration/travis-ci app_id: type: integer required: - context - app_id contexts_url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts required: - url - contexts_url - strict - contexts - checks protected-branch: title: Protected Branch description: Branch protections protect branches type: object properties: url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World required_status_checks: $ref: '#/components/schemas/status-check-policy' required_pull_request_reviews: type: object properties: url: type: string format: uri dismiss_stale_reviews: type: boolean require_code_owner_reviews: type: boolean required_approving_review_count: type: integer require_last_push_approval: description: |- Whether the most recent push must be approved by someone other than the person who pushed it. type: boolean default: false dismissal_restrictions: type: object properties: url: type: string format: uri users_url: type: string format: uri teams_url: type: string format: uri users: type: array items: $ref: '#/components/schemas/simple-user' teams: type: array items: $ref: '#/components/schemas/team' apps: type: array items: $ref: '#/components/schemas/integration' required: - url - users_url - teams_url - users - teams bypass_pull_request_allowances: type: object properties: users: type: array items: $ref: '#/components/schemas/simple-user' teams: type: array items: $ref: '#/components/schemas/team' apps: type: array items: $ref: '#/components/schemas/integration' required: - users - teams required: - url required_signatures: type: object properties: url: type: string format: uri example: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures enabled: type: boolean example: true required: - url - enabled enforce_admins: type: object properties: url: type: string format: uri enabled: type: boolean additionalProperties: false required: - url - enabled required_linear_history: type: object properties: enabled: type: boolean additionalProperties: false required: - enabled allow_force_pushes: type: object properties: enabled: type: boolean additionalProperties: false required: - enabled allow_deletions: type: object properties: enabled: type: boolean additionalProperties: false required: - enabled restrictions: $ref: '#/components/schemas/branch-restriction-policy' required_conversation_resolution: type: object properties: enabled: type: boolean additionalProperties: false block_creations: type: object properties: enabled: type: boolean additionalProperties: false required: - enabled lock_branch: type: object description: |- Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. properties: enabled: default: false type: boolean additionalProperties: false allow_fork_syncing: type: object description: |- Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. properties: enabled: default: false type: boolean additionalProperties: false required: - url examples: simple-user-items: value: - login: octocat id: 1 node_id: MDQ6VXNlcjE= avatar_url: https://github.com/images/error/octocat_happy.gif gravatar_id: '' url: https://api.github.com/users/octocat html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs repos_url: https://api.github.com/users/octocat/repos events_url: https://api.github.com/users/octocat/events{/privacy} received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false team-items: value: - id: 1 node_id: MDQ6VGVhbTE= url: https://api.github.com/teams/1 html_url: https://github.com/orgs/github/teams/justice-league name: Justice League slug: justice-league description: great team. privacy: closed permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos parent: id: 2 node_id: MDQ6VGVhbTE= url: https://api.github.com/teams/1 html_url: https://github.com/orgs/github/teams/justice-league name: Justice League slug: justice-league description: great team. privacy: closed permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos branch-get: value: name: main commit: sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d node_id: |- MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk commit: author: name: The Octocat email: octocat@nowhere.com date: '2012-03-06T23:06:50Z' committer: name: The Octocat email: octocat@nowhere.com date: '2012-03-06T23:06:50Z' message: |- Merge pull request #6 from Spaceghost/patch-1 New line at end of file. tree: sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 url: |- https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 url: |- https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d comment_count: 77 verification: verified: false reason: unsigned signature: '' payload: '' url: |- https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d html_url: |- https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d comments_url: |- https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments author: login: octocat id: 583231 node_id: MDQ6VXNlcjU4MzIzMQ== avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 gravatar_id: '' url: https://api.github.com/users/octocat html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs repos_url: https://api.github.com/users/octocat/repos events_url: https://api.github.com/users/octocat/events{/privacy} received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false committer: login: octocat id: 583231 node_id: MDQ6VXNlcjU4MzIzMQ== avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 gravatar_id: '' url: https://api.github.com/users/octocat html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs repos_url: https://api.github.com/users/octocat/repos events_url: https://api.github.com/users/octocat/events{/privacy} received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false parents: - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e url: |- https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e html_url: |- https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 url: |- https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 html_url: |- https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 _links: self: https://api.github.com/repos/octocat/Hello-World/branches/main html: https://github.com/octocat/Hello-World/tree/main protected: false protection: enabled: false required_status_checks: enforcement_level: 'off' contexts: [] checks: [] protection_url: |- https://api.github.com/repos/octocat/Hello-World/branches/main/protection branch-protection: value: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection required_status_checks: checks: [] url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks contexts: - continuous-integration/travis-ci contexts_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts enforcement_level: non_admins enforce_admins: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins enabled: true required_pull_request_reviews: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews dismissal_restrictions: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions users_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users teams_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams users: - login: octocat id: 1 node_id: MDQ6VXNlcjE= avatar_url: https://github.com/images/error/octocat_happy.gif gravatar_id: '' url: https://api.github.com/users/octocat html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs repos_url: https://api.github.com/users/octocat/repos events_url: https://api.github.com/users/octocat/events{/privacy} received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false teams: - id: 1 node_id: MDQ6VGVhbTE= url: https://api.github.com/teams/1 html_url: https://github.com/orgs/github/teams/justice-league name: Justice League slug: justice-league description: great team. privacy: closed permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos parent: id: 2 node_id: MDQ6VGVhbTE= url: https://api.github.com/teams/1 html_url: https://github.com/orgs/github/teams/justice-league name: Justice League slug: justice-league description: great team. privacy: closed permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos apps: - id: 1 slug: octoapp node_id: MDExOkludGVncmF0aW9uMQ== owner: login: github id: 1 type: User node_id: MDEyOk9yZ2FuaXphdGlvbjE= url: https://api.github.com/orgs/github repos_url: https://api.github.com/orgs/github/repos events_url: https://api.github.com/orgs/github/events hooks_url: https://api.github.com/orgs/github/hooks issues_url: https://api.github.com/orgs/github/issues members_url: https://api.github.com/orgs/github/members{/member} public_members_url: https://api.github.com/orgs/github/public_members{/member} followers_url: https://api.github.com/orgs/github/followers following_url: https://api.github.com/orgs/github/following gists_url: https://api.github.com/users/octocat/gists{/gist_id} avatar_url: https://github.com/images/error/octocat_happy.gif description: great organization gravatar_id: '' html_url: https://github.com/apps/octoapp organizations_url: https://api.github.com/users/octocat/orgs received_events_url: https://api.github.com/users/octocat/received_events starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions site_admin: false name: Octocat App description: '' external_url: https://example.com html_url: https://github.com/apps/octoapp created_at: '2017-07-08T16:18:44-04:00' updated_at: '2017-07-08T16:18:44-04:00' permissions: metadata: read contents: read issues: write single_file: write events: - push - pull_request dismiss_stale_reviews: true require_code_owner_reviews: true required_approving_review_count: 2 require_last_push_approval: true restrictions: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions users_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users teams_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams apps_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/apps users: - login: octocat id: 1 node_id: MDQ6VXNlcjE= avatar_url: https://github.com/images/error/octocat_happy.gif gravatar_id: '' url: https://api.github.com/users/octocat html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs repos_url: https://api.github.com/users/octocat/repos events_url: https://api.github.com/users/octocat/events{/privacy} received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false teams: - id: 1 node_id: MDQ6VGVhbTE= url: https://api.github.com/teams/1 html_url: https://github.com/orgs/github/teams/justice-league name: Justice League slug: justice-league description: great team. privacy: closed permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos parent: '' apps: - id: 1 slug: octoapp node_id: MDExOkludGVncmF0aW9uMQ== owner: login: github id: 1 node_id: MDEyOk9yZ2FuaXphdGlvbjE= url: https://api.github.com/orgs/github repos_url: https://api.github.com/orgs/github/repos events_url: https://api.github.com/orgs/github/events hooks_url: https://api.github.com/orgs/github/hooks issues_url: https://api.github.com/orgs/github/issues members_url: https://api.github.com/orgs/github/members{/member} public_members_url: https://api.github.com/orgs/github/public_members{/member} avatar_url: https://github.com/images/error/octocat_happy.gif description: great organization name: Octocat App description: '' external_url: https://example.com html_url: https://github.com/apps/octoapp created_at: '2017-07-08T16:18:44-04:00' updated_at: '2017-07-08T16:18:44-04:00' permissions: metadata: read contents: read issues: write single_file: write events: - push - pull_request required_linear_history: enabled: true allow_force_pushes: enabled: true allow_deletions: enabled: true required_conversation_resolution: enabled: true lock_branch: enabled: true allow_fork_syncing: enabled: true branch-protection-update: value: url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection required_status_checks: url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks strict: true contexts: - continuous-integration/travis-ci contexts_url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts checks: - context: continuous-integration/travis-ci app_id: 1 restrictions: url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions users_url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users teams_url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams apps_url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps users: [] teams: [] apps: [] required_pull_request_reviews: url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews dismiss_stale_reviews: true require_code_owner_reviews: true required_approving_review_count: 2 require_last_push_approval: true dismissal_restrictions: url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions users_url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users teams_url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams users: [] teams: [] apps: [] required_signatures: url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures enabled: false enforce_admins: url: |- https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins enabled: true required_linear_history: enabled: true allow_force_pushes: enabled: true allow_deletions: enabled: true block_creations: enabled: true required_conversation_resolution: enabled: true lock_branch: enabled: true allow_fork_syncing: enabled: true protected-branch-admin-enforced-2: value: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins enabled: true protected-branch-pull-request-review: value: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews dismissal_restrictions: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions users_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users teams_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams users: - login: octocat id: 1 node_id: MDQ6VXNlcjE= avatar_url: https://github.com/images/error/octocat_happy.gif gravatar_id: '' url: https://api.github.com/users/octocat html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs repos_url: https://api.github.com/users/octocat/repos events_url: https://api.github.com/users/octocat/events{/privacy} received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false teams: - id: 1 node_id: MDQ6VGVhbTE= url: https://api.github.com/teams/1 html_url: https://github.com/orgs/github/teams/justice-league name: Justice League slug: justice-league description: great team. privacy: closed permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos parent: id: 2 node_id: MDQ6VGVhbTE= url: https://api.github.com/teams/1 html_url: https://github.com/orgs/github/teams/justice-league name: Justice League slug: justice-league description: great team. privacy: closed permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos apps: - id: 1 slug: octoapp node_id: MDExOkludGVncmF0aW9uMQ== owner: login: github id: 1 type: User node_id: MDEyOk9yZ2FuaXphdGlvbjE= url: https://api.github.com/orgs/github repos_url: https://api.github.com/orgs/github/repos events_url: https://api.github.com/orgs/github/events hooks_url: https://api.github.com/orgs/github/hooks issues_url: https://api.github.com/orgs/github/issues members_url: https://api.github.com/orgs/github/members{/member} public_members_url: https://api.github.com/orgs/github/public_members{/member} followers_url: https://api.github.com/orgs/github/followers following_url: https://api.github.com/orgs/github/following avatar_url: https://github.com/images/error/octocat_happy.gif gists_url: https://api.github.com/users/octocat/gists{/gist_id} description: great organization gravatar_id: '' html_url: https://github.com/apps/octoapp organizations_url: https://api.github.com/users/octocat/orgs received_events_url: https://api.github.com/users/octocat/received_events starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions site_admin: false name: Octocat App description: '' external_url: https://example.com html_url: https://github.com/apps/octoapp created_at: '2017-07-08T16:18:44-04:00' updated_at: '2017-07-08T16:18:44-04:00' permissions: metadata: read contents: read issues: write single_file: write events: - push - pull_request dismiss_stale_reviews: true require_code_owner_reviews: true required_approving_review_count: 2 require_last_push_approval: true protected-branch-admin-enforced: value: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures enabled: true status-check-policy: value: checks: [] url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks strict: true contexts: - continuous-integration/travis-ci contexts_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts branch-restriction-policy: value: url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions users_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users teams_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams apps_url: |- https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/apps users: - login: octocat id: 1 node_id: MDQ6VXNlcjE= avatar_url: https://github.com/images/error/octocat_happy.gif gravatar_id: '' url: https://api.github.com/users/octocat html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs repos_url: https://api.github.com/users/octocat/repos events_url: https://api.github.com/users/octocat/events{/privacy} received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false teams: - id: 1 node_id: MDQ6VGVhbTE= url: https://api.github.com/teams/1 html_url: https://github.com/orgs/github/teams/justice-league name: Justice League slug: justice-league description: great team. privacy: closed permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos parent: '' apps: - id: 1 slug: octoapp node_id: MDExOkludGVncmF0aW9uMQ== owner: login: github id: 1 node_id: MDEyOk9yZ2FuaXphdGlvbjE= url: https://api.github.com/orgs/github repos_url: https://api.github.com/orgs/github/repos events_url: https://api.github.com/orgs/github/events hooks_url: https://api.github.com/orgs/github/hooks issues_url: https://api.github.com/orgs/github/issues members_url: https://api.github.com/orgs/github/members{/member} public_members_url: https://api.github.com/orgs/github/public_members{/member} avatar_url: https://github.com/images/error/octocat_happy.gif description: great organization name: Octocat App description: '' external_url: https://example.com html_url: https://github.com/apps/octoapp created_at: '2017-07-08T16:18:44-04:00' updated_at: '2017-07-08T16:18:44-04:00' permissions: metadata: read contents: read issues: write single_file: write events: - push - pull_request integration-items: value: - id: 1 slug: octoapp node_id: MDExOkludGVncmF0aW9uMQ== owner: login: github id: 1 node_id: MDEyOk9yZ2FuaXphdGlvbjE= url: https://api.github.com/orgs/github repos_url: https://api.github.com/orgs/github/repos events_url: https://api.github.com/orgs/github/events avatar_url: https://github.com/images/error/octocat_happy.gif gravatar_id: '' html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: true name: Octocat App description: '' external_url: https://example.com html_url: https://github.com/apps/octoapp created_at: '2017-07-08T16:18:44-04:00' updated_at: '2017-07-08T16:18:44-04:00' permissions: metadata: read contents: read issues: write single_file: write events: - push - pull_request branch-with-protection: value: name: master commit: sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d node_id: MDY6Q29tbWl0N2ZkMWE2MGIwMWY5MWIzMTRmNTk5NTVhNGU0ZDRlODBkOGVkZjExZA== commit: author: name: The Octocat date: '2012-03-06T15:06:50-08:00' email: octocat@nowhere.com url: |- https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d message: |- Merge pull request #6 from Spaceghost/patch-1 New line at end of file. tree: sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 url: |- https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 committer: name: The Octocat date: '2012-03-06T15:06:50-08:00' email: octocat@nowhere.com verification: verified: false reason: unsigned signature: '' payload: '' comment_count: 0 author: gravatar_id: '' avatar_url: |- https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png url: https://api.github.com/users/octocat id: 583231 login: octocat node_id: MDQ6VXNlcjE= html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs repos_url: https://api.github.com/users/octocat/repos events_url: https://api.github.com/users/octocat/events{/privacy} received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: true parents: - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e url: |- https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 url: |- https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 url: |- https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d committer: gravatar_id: '' avatar_url: |- https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png url: https://api.github.com/users/octocat id: 583231 login: octocat node_id: MDQ6VXNlcjE= html_url: https://github.com/octocat followers_url: https://api.github.com/users/octocat/followers following_url: https://api.github.com/users/octocat/following{/other_user} gists_url: https://api.github.com/users/octocat/gists{/gist_id} starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: https://api.github.com/users/octocat/subscriptions organizations_url: https://api.github.com/users/octocat/orgs repos_url: https://api.github.com/users/octocat/repos events_url: https://api.github.com/users/octocat/events{/privacy} received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: true html_url: |- https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e comments_url: |- https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments _links: html: https://github.com/octocat/Hello-World/tree/master self: https://api.github.com/repos/octocat/Hello-World/branches/master protected: true protection: required_status_checks: checks: [] enforcement_level: non_admins contexts: - ci-test - linter protection_url: |- https://api.github.com/repos/octocat/hello-world/branches/master/protection parameters: owner: name: owner description: The account owner of the repository. The name is not case sensitive. in: path required: true schema: type: string repo: name: repo description: |- The name of the repository without the `.git` extension. The name is not case sensitive. in: path required: true schema: type: string branch: name: branch description: |- The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql). in: path required: true schema: type: string x-multi-segment: true responses: not_found: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/basic-error' validation_failed_simple: description: Validation failed, or the endpoint has been spammed. content: application/json: schema: $ref: '#/components/schemas/validation-error-simple' validation_failed: description: Validation failed, or the endpoint has been spammed. content: application/json: schema: $ref: '#/components/schemas/validation-error' forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/basic-error' moved_permanently: description: Moved permanently content: application/json: schema: $ref: '#/components/schemas/basic-error' securitySchemes: bearerHttpAuthentication: description: Bearer Token type: http scheme: Bearer