GitHub References API

The References API from GitHub — 10 operation(s) for references.

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-references-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About References 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: References
paths:
  /repos/{owner}/{repo}/autolinks:
    post:
      summary: GitHub Create an Autolink Reference for Repository
      description: Users with admin access to the repository can create an autolink.
      tags:
      - References
      operationId: createAnAutolinkReferenceForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/repos/autolinks#create-an-autolink-reference-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - 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:
                key_prefix:
                  type: string
                  description: This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit.
                url_template:
                  type: string
                  description: The URL must contain `<num>` for the reference number. `<num>` matches different characters depending on the value of `is_alphanumeric`.
                is_alphanumeric:
                  type: boolean
                  default: true
                  description: Whether this autolink reference matches alphanumeric characters. If true, the `<num>` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters.
              required:
              - key_prefix
              - url_template
            examples:
              default:
                value:
                  key_prefix: TICKET-
                  url_template: https://example.com/TICKET?query=<num>
                  is_alphanumeric: true
      responses:
        '201':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/autolink'
              examples:
                default:
                  $ref: '#/components/examples/autolink'
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World/autolinks/1
              schema:
                type: string
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: repos
        subcategory: autolinks
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/autolinks/{autolink_id}:
    get:
      summary: GitHub Get an Autolink Reference of Repository
      description: 'This returns a single autolink reference by ID that was configured for the given repository.


        Information about autolinks are only available to repository administrators.'
      tags:
      - References
      operationId: getAnAutolinkReferenceOfRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/repos/autolinks#get-an-autolink-reference-of-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/autolink-id'
      - 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/autolink'
              examples:
                default:
                  $ref: '#/components/examples/autolink'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: repos
        subcategory: autolinks
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete an Autolink Reference from Repository
      description: 'This deletes a single autolink reference by ID that was configured for the given repository.


        Information about autolinks are only available to repository administrators.'
      tags:
      - References
      operationId: deleteAnAutolinkReferenceFromRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/repos/autolinks#delete-an-autolink-reference-from-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/autolink-id'
      - 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: repos
        subcategory: autolinks
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/commits/{ref}/check-runs:
    get:
      summary: GitHub List Check Runs for Git Reference
      description: 'Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name.


        **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.


        If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/enterprise-server@3.9/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/enterprise-server@3.9/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository.'
      tags:
      - References
      operationId: listCheckRunsForGitReference
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/checks/runs#list-check-runs-for-a-git-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/commit-ref'
      - $ref: '#/components/parameters/check-name'
      - $ref: '#/components/parameters/status'
      - name: filter
        description: Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs.
        in: query
        required: false
        schema:
          type: string
          enum:
          - latest
          - all
          default: latest
        example: latest
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - name: app_id
        in: query
        required: false
        schema:
          type: integer
        example: 42
      - 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: object
                required:
                - total_count
                - check_runs
                properties:
                  total_count:
                    type: integer
                  check_runs:
                    type: array
                    items:
                      $ref: '#/components/schemas/check-run'
              examples:
                default:
                  $ref: '#/components/examples/check-run-paginated'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: checks
        subcategory: runs
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/commits/{ref}/check-suites:
    get:
      summary: GitHub List Check Suites for Git Reference
      description: 'Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name.


        **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository.'
      tags:
      - References
      operationId: listCheckSuitesForGitReference
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/checks/suites#list-check-suites-for-a-git-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/commit-ref'
      - name: app_id
        description: Filters check suites by GitHub App `id`.
        in: query
        required: false
        schema:
          type: integer
        example: 1
      - $ref: '#/components/parameters/check-name'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - 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: object
                required:
                - total_count
                - check_suites
                properties:
                  total_count:
                    type: integer
                  check_suites:
                    type: array
                    items:
                      $ref: '#/components/schemas/check-suite'
              examples:
                default:
                  $ref: '#/components/examples/check-suite-paginated'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: checks
        subcategory: suites
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/commits/{ref}/status:
    get:
      summary: GitHub Get the Combined Status for Specific Reference
      description: 'Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.



        Additionally, a combined `state` is returned. The `state` is one of:


        *   **failure** if any of the contexts report as `error` or `failure`

        *   **pending** if there are no statuses or a context is `pending`

        *   **success** if the latest status for all contexts is `success`'
      tags:
      - References
      operationId: getTheCombinedStatusForSpecificReference
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/commits/statuses#get-the-combined-status-for-a-specific-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/commit-ref'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - 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/combined-commit-status'
              examples:
                default:
                  $ref: '#/components/examples/combined-commit-status'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: commits
        subcategory: statuses
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/commits/{ref}/statuses:
    get:
      summary: GitHub List Commit Statuses for Reference
      description: 'Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.


        This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`.'
      tags:
      - References
      operationId: listCommitStatusesForReference
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/commits/statuses#list-commit-statuses-for-a-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/commit-ref'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - 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/status'
              examples:
                default:
                  $ref: '#/components/examples/status-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '301':
          $ref: '#/components/responses/moved_permanently'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: commits
        subcategory: statuses
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/matching-refs/{ref}:
    get:
      summary: GitHub List Matching References
      description: 'Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn''t exist in the repository, but existing refs start with `:ref`, they will be returned as an array.


        When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`.


        **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.9/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-server@3.9/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".


        If you request matching references for a branch named `feature` but the branch `feature` doesn''t exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`.'
      tags:
      - References
      operationId: listMatchingReferences
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#list-matching-references
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/git-ref-only'
      - 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/git-ref'
              examples:
                default:
                  $ref: '#/components/examples/git-ref-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/ref/{ref}:
    get:
      summary: GitHub Get Reference
      description: 'Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn''t match an existing ref, a `404` is returned.


        **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.9/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-server@3.9/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".'
      tags:
      - References
      operationId: getReference
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#get-a-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/git-ref-only'
      - 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/git-ref'
              examples:
                default:
                  $ref: '#/components/examples/git-ref'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/refs:
    post:
      summary: GitHub Create Reference
      description: Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.
      tags:
      - References
      operationId: createReference
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#create-a-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - 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:
                ref:
                  type: string
                  description: 'The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn''t start with ''refs'' and have at least two slashes, it will be rejected.'
                sha:
                  type: string
                  description: The SHA1 value for this reference.
              required:
              - ref
              - sha
            examples:
              default:
                value:
                  ref: refs/heads/featureA
                  sha: aa218f56b14c9653891f9e74264a383fa43fefbd
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/git-ref'
              examples:
                default:
                  $ref: '#/components/examples/git-ref'
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA
              schema:
                type: string
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/refs/{ref}:
    patch:
      summary: GitHub Update Reference
      description: Updates the provided reference to point to a new SHA. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation.
      tags:
      - References
      operationId: updateReference
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#update-a-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/git-ref-only'
      - 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:
                sha:
                  type: string
                  description: The SHA1 value to set this reference to
                force:
                  type: boolean
                  description: Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work.
                  default: false
              required:
              - sha
            examples:
              default:
                value:
                  sha: aa218f56b14c9653891f9e74264a383fa43fefbd
                  force: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/git-ref'
              examples:
                default:
                  $ref: '#/components/examples/git-ref'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Reference
      description: Deletes the provided reference.
      tags:
      - References
      operationId: deleteReference
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#delete-a-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/git-ref-only'
      - 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
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      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
    pull-request-minimal:
      title: Pull Request Minimal
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 42
        number:
          type: integer
          example: 42
        url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        head:
          type: object
          properties:
            ref:
              type: string
            sha:
 

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