GitHub Matching API

The Matching API from GitHub — 1 operation(s) for matching.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
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-matching-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: github-repos-api Matching API
  description: 'Use the REST API to create, manage and control the workflow of public and

    private GitHub repositories.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact
servers:
- url: '{protocol}://{hostname}'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: api.github.com
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: https
tags:
- name: Matching
paths:
  /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:
      - Matching
      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
components:
  parameters:
    git-ref-only:
      name: ref
      description: The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation.
      in: path
      required: true
      example: heads/feature-a
      schema:
        type: string
      x-multi-segment: true
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    repo:
      name: repo
      description: The name of the repository without the `.git` extension. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
  headers:
    link:
      example: <https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"
      schema:
        type: string
  schemas:
    git-ref:
      title: Git Reference
      description: Git references within a repository
      type: object
      properties:
        ref:
          type: string
          example: main
        node_id:
          type: string
          example: '12345678'
        url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
        object:
          type: object
          properties:
            type:
              type: string
            sha:
              description: SHA for the reference
              example: 7638417db6d59f3c431d3e1f261cc637155684cd
              type: string
              minLength: 40
              maxLength: 40
            url:
              type: string
              format: uri
          required:
          - type
          - sha
          - url
      required:
      - ref
      - node_id
      - url
      - object
  examples:
    git-ref-items:
      value:
      - ref: refs/heads/feature-a
        node_id: MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlLWE=
        url: https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-a
        object:
          type: commit
          sha: aa218f56b14c9653891f9e74264a383fa43fefbd
          url: https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd
      - ref: refs/heads/feature-b
        node_id: MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlLWI=
        url: https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-b
        object:
          type: commit
          sha: 612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac
          url: https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac
  securitySchemes:
    bearerHttpAuthentication:
      description: Bearer Token
      type: http
      scheme: Bearer
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://docs.github.com/enterprise-server@3.9/rest/