Github API

Getting access, Developing, Testing

Back to Github

Get a reference

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 to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "Checking mergeability of pull requests".

Input

type: object properties: parameters: type: object properties: owner: type: string description: The account owner of the repository. The name is not case sensitive. repo: type: string description: The name of the repository. The name is not case sensitive. ref: type: string description: ref parameter required: - owner - repo - ref title: Parameters

Output

type: object title: Git Reference properties: ref: type: string node_id: type: string url: type: string format: uri 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