Search issues
github-search-issues
Search issues and pull requests in the repositories the token can reach, with GitHub search syntax such as `repo:acme/widgets is:issue is:open label:bug`. Returns `total_count` and up to 5 `items` per page, bodies included; pass `page` for the next page (GitHub returns at most the first 1,000 results). Include `is:issue` or `is:pr`, and `repo:owner/name` to stay in one repository; GitHub allows 30 searches a minute.
List issues
github-list-issues
List issues in one repository, newest first by default, 5 per page with bodies; pass `page` for the next page. GitHub includes pull requests in this list (they carry a `pull_request` key). Filters: state (open by default), labels (comma-separated names, all must match), assignee, creator, milestone number, and since (updated after).
Get issue
github-get-issue
Get one issue by number: title, body, state and state reason, labels, assignees, milestone and comment count. A pull request number also works here and returns the pull request as an issue (with a `pull_request` key).
List issue comments
github-list-issue-comments
List the comments on one issue or pull request conversation, oldest first, 10 per page; pass `page` for the next page. `since` returns only comments updated after that time. Comments on a pull request's diff are in list-review-comments.
List labels
github-list-labels
List the labels defined in a repository (name, color, description), 100 per page; pass `page` for the next page.
List pull requests
github-list-pull-requests
List pull requests in one repository, newest first by default, 3 per page because each one carries full head and base repository objects; pass `page` for the next page. Filters: state (open by default), base branch, and head as `owner:branch`. For a compact list of many pull requests use search-issues with `is:pr`.
Get pull request
github-get-pull-request
Get one pull request by number: title, body, state, draft, head and base branches with their SHAs, `merged`, `mergeable` (null while GitHub is still computing it; ask again shortly), requested reviewers, and commit, addition, deletion and changed-file counts.
List pull request files
github-list-pull-request-files
List the files a pull request changes, 10 per page, each with its status, addition and deletion counts and its patch; pass `page` for the next page. GitHub returns at most 3,000 files, and a page with very large patches can reach the 64 KB response cut.
List reviews
github-list-reviews
List the reviews on a pull request in the order they were submitted, 10 per page, each with its reviewer, state (APPROVED, CHANGES_REQUESTED, COMMENTED, DISMISSED or PENDING), body and commit; pass `page` for the next page.
List review comments
github-list-review-comments
List the comments left on a pull request's diff, 10 per page, each with its file path, line, diff hunk, body and the review it belongs to; pass `page` for the next page. `since` returns only comments updated after that time.
Get repository
github-get-repository
Get one repository: full name, description, visibility, default branch, topics, whether issues are enabled, and open issue count.
List branches
github-list-branches
List a repository's branches, each with its head commit SHA and whether it is protected, 50 per page; pass `page` for the next page. Set `protected` to true for protected branches only.
Get file contents
github-get-file-contents
Get one file or directory from a repository, at a branch, tag or commit (`ref`; the default branch when left out). A file comes back with its `content` in base64 and its blob `sha`; a directory comes back as a list of entries (up to 1,000). A file over about 45 KB is cut by the 64 KB response limit once encoded, and GitHub returns no content over 1 MB in this form.
List commits
github-list-commits
List commits newest first from a branch or SHA (the default branch when left out), 8 per page; pass `page` for the next page. Filter by a file path, an author login or email, and a time window (since, until).
Search code
github-search-code
Search code on the default branches of the repositories the token can reach, for example `retryCharge repo:acme/widgets path:src`. The query needs at least one search term, not only qualifiers. Returns `total_count` and up to 8 matches per page (file name, path, blob sha, repository); pass `page` for the next page. GitHub allows 10 code searches a minute and searches only files under 384 KB.