GitHub Compare API

The Compare API from GitHub — 1 operation(s) for compare.

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-compare-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Compare 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: Compare
paths:
  /repos/{owner}/{repo}/compare/{basehead}:
    get:
      summary: GitHub Compare Two Commits
      description: 'Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository''s network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-server@3.9/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."


        This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.


        This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."


        - **`application/vnd.github.diff`**: Returns the diff of the commit.

        - **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.


        The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.


        When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.


        **Working with large comparisons**


        To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:


        - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison.

        - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.


        For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/guides/using-pagination-in-the-rest-api)."


        **Signature verification object**


        The response will include a `verification` object that describes the result of verifying the commit''s signature. The `verification` object includes the following fields:


        | Name | Type | Description |

        | - | - | -- |

        | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |

        | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |

        | `signature` | `string` | The signature that was extracted from the commit. |

        | `payload` | `string` | The value that was signed. |


        These are the possible values for `reason` in the `verification` object:


        | Value | Description |

        | -- | -- |

        | `expired_key` | The key that made the signature is expired. |

        | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |

        | `gpgverify_error` | There was an error communicating with the signature verification service. |

        | `gpgverify_unavailable` | The signature verification service is currently unavailable. |

        | `unsigned` | The object does not include a signature. |

        | `unknown_signature_type` | non-PGP signature was found in the commit. |

        | `no_user` | No user was associated with the `committer` email address in the commit. |

        | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. |

        | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |

        | `unknown_key` | The key that made the signature has not been registered with any user''s account. |

        | `malformed_signature` | There was an error parsing the signature. |

        | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |

        | `valid` | None of the above errors applied, so the signature is considered to be verified. |'
      tags:
      - Compare
      operationId: compareTwoCommits
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/commits/commits#compare-two-commits
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per-page'
      - name: basehead
        description: The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`.
        in: path
        required: true
        x-multi-segment: true
        schema:
          type: string
        example: example_value
      - 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/commit-comparison'
              examples:
                default:
                  $ref: '#/components/examples/commit-comparison'
        '404':
          $ref: '#/components/responses/not_found'
        '500':
          $ref: '#/components/responses/internal_error'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: commits
        subcategory: commits
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    page:
      name: page
      description: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 1
    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
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    per-page:
      name: per_page
      description: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 30
  schemas:
    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
    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-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"'
    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
    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-comparison:
      title: Commit Comparison
      description: Commit Comparison
      type: object
      properties:
        url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World/compare/master...topic
        html_url:
          type: string
          format: uri
          example: https://github.com/octocat/Hello-World/compare/master...topic
        permalink_url:
          type: string
          format: uri
          example: https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17
        diff_url:
          type: string
          format: uri
          example: https://github.com/octocat/Hello-World/compare/master...topic.diff
        patch_url:
          type: string
          format: uri
          example: https://github.com/octocat/Hello-World/compare/master...topic.patch
        base_commit:
          $ref: '#/components/schemas/commit'
        merge_base_commit:
          $ref: '#/components/schemas/commit'
        status:
          type: string
          enum:
          - diverged
          - ahead
          - behind
          - identical
          example: ahead
        ahead_by:
          type: integer
          example: 4
        behind_by:
          type: integer
          example: 5
        total_commits:
          type: integer
          example: 6
        commits:
          type: array
          items:
            $ref: '#/components/schemas/commit'
        files:
          type: array
          items:
            $ref: '#/components/schemas/diff-entry'
      required:
      - url
      - html_url
      - permalink_url
      - diff_url
      - patch_url
      - base_commit
      - merge_base_commit
      - status
      - ahead_by
      - behind_by
      - total_commits
      - commits
  responses:
    not_found:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    internal_error:
      description: Internal Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    service_unavailable:
      description: Service unavailable
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              documentation_url:
                type: string
  examples:
    commit-comparison:
      value:
        url: https://api.github.com/repos/octocat/Hello-World/compare/master...topic
        html_url: https://github.com/octocat/Hello-World/compare/master...topic
        permalink_url: https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17
        diff_url: https://github.com/octocat/Hello-World/compare/master...topic.diff
        patch_url: https://github.com/octocat/Hello-World/compare/master...topic.patch
        base_commit:
          url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e
          sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e
          node_id: MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==
          html_url: https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e
          comments_url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments
          commit:
            url: https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e
            author:
              name: Monalisa Octocat
              email: mona@github.com
              date: '2011-04-14T16:00:49Z'
            committer:
              name: Monalisa Octocat
              email: mona@github.com
              date: '2011-04-14T16:00:49Z'
            message: Fix all the bugs
            tree:
              url: https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e
              sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e
            comment_count: 0
            verification:
              verified: false
              reason: unsigned
              signature: ''
              payload: ''
          author:
            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
          committer:
            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
          parents:
          - url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e
            sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e
        merge_base_commit:
          url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e
          sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e
          node_id: MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==
          html_url: https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e
          comments_url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments
          commit:
            url: https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e
            author:
              name: Monalisa Octocat
              email: mona@github.com
              date: '2011-04-14T16:00:49Z'
            committer:
              name: Monalisa Octocat
              email: mona@github.com
              date: '2011-04-14T16:00:49Z'
            message: Fix all the bugs
            tree:
              url: https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e
              sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e
            comment_count: 0
            verification:
              verified: false
              reason: unsigned
              signature: ''
              payload: ''
          author:
            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
          committer:
            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
          parents:
          - url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e
            sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e
        status: behind
        ahead_by: 1
        behind_by: 2
        total_commits: 1
        commits:
        - url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e
          sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e
          node_id: MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==
          html_url: https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e
          comments_url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments
          commit:
            url: https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e
            author:
              name: Monalisa Octocat
              email: mona@github.com
              date: '2011-04-14T16:00:49Z'
            committer:
              name: Monalisa Octocat
              email: mona@github.com
              date: '2011-04-14T16:00:49Z'
            message: Fix all the bugs
            tree:
              url: https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e
              sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e
            comment_count: 0
            verification:
              verified: false
              reason: unsigned
              signature: ''
              payload: ''
          author:
            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
          committer:
            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
          parents:
          - url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e
            sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e
        files:
        - sha: bbcd538c8e72b8c175046e27cc8f907076331401
          filename: file1.txt
          status: added
          additions: 103
          deletions: 21
          changes: 124
          blob_url: https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt
          raw_url

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