GitHub Rename API

The Rename API from GitHub — 1 operation(s) for rename.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/ https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-rename-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Rename API
  description: 'Use the REST API to retrieve information about GitHub Apps and GitHub App

    installations.'
  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?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Rename
paths:
  /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:
      - 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
    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
    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
    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
    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
    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
    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:
      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
    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
    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
    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
    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
    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
    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-restriction-policy:
      title: Branch Restriction Policy
      description: Branch Restriction Policy
      type: object
      properties:
        url:
          type: string
          format: uri
         

# --- truncated at 32 KB (646 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-rename-api-openapi.yml