{"id":47444106,"url":"https://github.com/JuliaWeb/GitHub.jl","last_synced_at":"2026-04-06T13:00:57.703Z","repository":{"id":13935414,"uuid":"16635105","full_name":"JuliaWeb/GitHub.jl","owner":"JuliaWeb","description":"A Julia package for interfacing with GitHub","archived":false,"fork":false,"pushed_at":"2026-02-22T20:33:13.000Z","size":523,"stargazers_count":175,"open_issues_count":30,"forks_count":64,"subscribers_count":25,"default_branch":"master","last_synced_at":"2026-02-23T00:59:16.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaWeb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-02-08T03:41:23.000Z","updated_at":"2026-02-20T08:33:59.000Z","dependencies_parsed_at":"2024-06-18T15:22:01.103Z","dependency_job_id":"b52d4796-5b0d-41bc-b727-b6aa37269709","html_url":"https://github.com/JuliaWeb/GitHub.jl","commit_stats":{"total_commits":323,"total_committers":47,"mean_commits":6.872340425531915,"dds":0.7027863777089783,"last_synced_commit":"ec83ea9daf6951c8c9186b67de4fc337c9139a86"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/JuliaWeb/GitHub.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaWeb%2FGitHub.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaWeb%2FGitHub.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaWeb%2FGitHub.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaWeb%2FGitHub.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaWeb","download_url":"https://codeload.github.com/JuliaWeb/GitHub.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaWeb%2FGitHub.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31473271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-23T06:00:59.902Z","updated_at":"2026-04-06T13:00:57.694Z","avatar_url":"https://github.com/JuliaWeb.png","language":"Julia","funding_links":[],"categories":["Web Security"],"sub_categories":["Authentication and Tokens"],"readme":"# GitHub.jl\n\n[![Coverage Status](https://coveralls.io/repos/JuliaWeb/GitHub.jl/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/JuliaWeb/GitHub.jl?branch=master)\n\nGitHub.jl provides a Julia interface to the [GitHub API v3](https://developer.github.com/v3/). Using GitHub.jl, you can do things like:\n\n- query for basic repository, organization, and user information\n- programmatically take user-level actions (e.g. starring a repository, commenting on an issue, etc.)\n- set up listeners that can detect and respond to repository events\n- create and retrieve commit statuses (i.e. report CI pending/failure/success statuses to GitHub)\n\nHere's a table of contents for this rather lengthy README:\n\n[1. Response Types](#response-types)\n\n[2. REST Methods](#rest-methods)\n\n[3. Authentication](#authentication)\n\n[4. Pagination](#pagination)\n\n[5. Handling Webhook Events](#handling-webhook-events)\n\n[6. GitHub Enterprise](#github-enterprise)\n\n## Response Types\n\nGitHub's JSON responses are parsed and returned to the caller as types of the form `G\u003c:GitHub.GitHubType`. Here's some useful information about these types:\n\n- All fields are `Union{Nothing, T}`.\n- Field names generally match the corresponding field in GitHub's JSON representation (the exception is `\"type\"`, which has the corresponding field name `typ` to avoid the obvious language conflict).\n- `GitHubType`s can be passed as arguments to API methods in place of (and in combination with) regular identifying properties. For example, `create_status(repo, commit)` could be called as:\n\n   - `create_status(::GitHub.Repo, ::GitHub.Commit)`\n   - `create_status(::GitHub.Repo, ::AbstractString)` where the second argument is the SHA\n   - `create_status(::AbstractString, ::GitHub.Commit)` where the first argument is the full qualified repo name\n   - `create_status(::AbstractString, ::AbstractString)` where the first argument is the repo name, and the second is the SHA\n\nHere's a table that matches up the provided `GitHubType`s with their corresponding API documentation, as well as alternative identifying values:\n\n| type              | alternative identifying property                                  | link(s) to documentation                                                                                                                                                                                      |\n|-------------------|-------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Owner`           | login, e.g. `\"octocat\"`                                           | [organizations](https://developer.github.com/v3/orgs/), [users](https://developer.github.com/v3/users/)                                                                                                       |\n| `Repo`            | full_name, e.g. `\"JuliaWeb/GitHub.jl\"`                            | [repositories](https://developer.github.com/v3/repos/)                                                                                                                                                        |\n| `Commit`          | sha, e.g. `\"d069993b320c57b2ba27336406f6ec3a9ae39375\"`            | [repository commits](https://developer.github.com/v3/repos/commits/)                                                                                                                                          |\n| `GitCommit`       | sha, e.g. `\"d069993b320c57b2ba27336406f6ec3a9ae39375\"`            | [raw git commits](https://developer.github.com/v3/git/commits/)                                                                                                                                               |\n| `Branch`          | name, e.g. `master`                                               | [repository branches](https://developer.github.com/v3/repos/#get-branch)                                                                                                                                      |\n| `Content`         | path, e.g. `\"src/owners/owners.jl\"`                               | [repository contents](https://developer.github.com/v3/repos/contents/)                                                                                                                                        |\n| `Comment`         | id, e.g. `162224613`                                              | [commit comments](https://developer.github.com/v3/repos/comments/), [issue comments](https://developer.github.com/v3/issues/comments/), [PR review comments](https://developer.github.com/v3/pulls/comments/) |\n| `Label`           | name, e.g. `bug`                                                  | [issue labels](https://docs.github.com/en/rest/reference/issues#labels)                                                                                                                                       |\n| `Status`          | id, e.g. `366961773`                                              | [commit statuses](https://developer.github.com/v3/repos/statuses/)                                                                                                                                            |\n| `PullRequest`     | number, e.g. `44`                                                 | [pull requests](https://developer.github.com/v3/pulls/)                                                                                                                                                       |\n| `PullRequestFile` | filename, e.g. `file1.txt`                                        | [pull request files](https://docs.github.com/en/rest/reference/pulls#list-pull-requests-files)                                                                                                                |\n| `Issue`           | number, e.g. `31`                                                 | [issues](https://developer.github.com/v3/issues/)                                                                                                                                                             |\n| `Team`            | id, e.g. `1`                                                      | [teams](https://developer.github.com/v3/orgs/teams)                                                                                                                                                           |\n| `Gist`            | id, e.g. `0bace7cc774df4b3a4b0ee9aaa271ef6`                       | [gists](https://developer.github.com/v3/gists)                                                                                                                                                                |\n| `Review`          | id, e.g. `1`                                                      | [reviews](https://developer.github.com/v3/pulls/reviews/)                                                                                                                                                     |\n| `Blob`            | sha, e.g. `\"95c8d1aa2a7b1e6d672e15b67e0df4abbe57dcbe\"`            | [raw git blobs](https://developer.github.com/v3/git/blobs/)                                                                                                                                                   |\n| `Tree`            | sha, e.g. `\"78e524d5e979e326a7c144ce195bf94ca9b04fa0\"`            | [raw git trees](https://developer.github.com/v3/git/trees/)                                                                                                                                                   |\n| `Tag`             | tag name, e.g. `v1.0`                                             | [git tags](https://docs.github.com/en/rest/reference/git#tags)                                                                                                                                                |\n| `References`      | reference name, e.g. `heads/master` (note: omits leading `refs/`) | [references](https://developer.github.com/v3/git/refs/)                                                                                                                                                       |\n| `Secrets`         | secret name, e.g. `TAGBOT_SECRET`                                 | [secrets](https://developer.github.com/v3/actions/secrets/)                                                                                                                                                   |\n| `DeployKeys`      | id, e.g., 12345                                                   | [deploy keys](https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#deploy-keys)                                                                                                               |\n\n\nYou can inspect which fields are available for a type `G\u003c:GitHubType` by calling `fieldnames(G)`.\n\n## REST Methods\n\nGitHub.jl implements a bunch of methods that make REST requests to GitHub's API. The below sections list these methods (note that a return type of `Tuple{Vector{T}, Dict}` means the result is [paginated](#pagination)).\n\nThese methods all accept keyword arguments which control how the request is made to GitHub:\n\n- `max_retries::Int=5`: how many retries to attempt in requesting the resources. Retries are only made for idempotent requests (\"GET\", \"HEAD\", \"OPTIONS\", \"TRACE\", \"PUT\", \"DELETE\") and delays respect GitHub [rate limit headers](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#checking-the-status-of-your-rate-limit).\n- `verbose::Bool=true`: whether or not to log retries as Info level logs\n- `max_sleep_seconds::Real=60*20`: if GitHub.jl intends to sleep for longer than `max_sleep_seconds` before retrying, e.g. due to rate limit headers from GitHub, throws an `RetryDelayException` instead. \n\n#### Users and Organizations\n\n| method                          | return type                  | documentation                                                                                                                                                                                               |\n|---------------------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `whoami()`                      | `Owner`                      | get currently authenticated user as a [user](https://developer.github.com/v3/users/#get-the-authenticated-user)                                                                                             |\n| `owner(owner[, isorg = false])` | `Owner`                      | get `owner` as a [user](https://developer.github.com/v3/users/#get-a-single-user) or [organization](https://developer.github.com/v3/orgs/#get-an-organization)                                              |\n| `orgs(owner)`                   | `Tuple{Vector{Owner}, Dict}` | [get the `owner`'s organizations](https://developer.github.com/v3/orgs/#list-user-organizations)                                                                                                            |\n| `followers(owner)`              | `Tuple{Vector{Owner}, Dict}` | [get the `owner`'s followers](https://developer.github.com/v3/users/followers/#list-followers-of-a-user)                                                                                                    |\n| `following(owner)`              | `Tuple{Vector{Owner}, Dict}` | [get the users followed by `owner`](https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user)                                                                                   |\n| `repos(owner[, isorg = false])` | `Tuple{Vector{Repo}, Dict}`  | [get the `owner`'s repositories](https://developer.github.com/v3/repos/#list-user-repositories)/[get an organization's repositories](https://developer.github.com/v3/repos/#list-organization-repositories) |\n| `teams(owner)`                  | `Tuple{Vector{Team}, Dict}`  | [get the `organizations`'s teams repositories](https://developer.github.com/v3/orgs/teams/#list-teams)                                                                                                      |\n| `sshkeys(owner)`                | `Tuple{Vector{Dict}, Dict}`  | [get the `owner`'s public ssh keys](https://developer.github.com/v3/users/keys/#list-public-keys-for-a-user)                                                                                                |\n| `gpgkeys(owner)`                | `Tuple{Vector{Dict}, Dict}`  | [get the `owner`'s public gpg keys](https://developer.github.com/v3/users/gpg_keys/#list-gpg-keys-for-a-user)                                                                                               |\n\n\n#### Teams\n| method               | return type                  | documentation                                                                                            |\n|----------------------|------------------------------|----------------------------------------------------------------------------------------------------------|\n| `members(team)`      | `Tuple{Vector{Owner}, Dict}` | get team members as [users](https://developer.github.com/v3/orgs/teams/#get-team-membership)             |\n| `repos(owner, team)` | `Tuple{Vector{Repo}, Dict}`  | get team repositories as [users](https://docs.github.com/en/rest/reference/teams#list-team-repositories) |\n\n\n#### Repositories\n\n| method                                                   | return type                    | documentation                                                                                                                                   |\n|----------------------------------------------------------|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| `repo(repo)`                                             | `Repo`                         | [get `repo`](https://developer.github.com/v3/repos/#get)                                                                                        |\n| `create_repo(owner, name)`                               | `Repo`                         | [create a repository of the given `name` in the given  `owner`'s account](https://developer.github.com/v3/repos/#create)                        |\n| `create_fork(repo)`                                      | `Repo`                         | [create a fork of `repo`](https://developer.github.com/v3/repos/forks/#create-a-fork)                                                           |\n| `forks(repo)`                                            | `Tuple{Vector{Repo}, Dict}`    | [get `repo`'s forks](https://developer.github.com/v3/repos/forks/#list-forks)                                                                   |\n| `contributors(repo)`                                     | `Dict`                         | [get `repo`'s contributors](https://developer.github.com/v3/repos/#list-contributors)                                                           |\n| `collaborators(repo)`                                    | `Tuple{Vector{Owner}, Dict}`   | [get `repo`'s collaborators](https://developer.github.com/v3/repos/collaborators/#list)                                                         |\n| `iscollaborator(repo, user)`                             | `Bool`                         | [check if `user` is a collaborator on `repo`](https://developer.github.com/v3/repos/collaborators/#get)                                         |\n| `add_collaborator(repo, user)`                           | `HTTP.Response`                | [add `user` as a collaborator to `repo`](https://developer.github.com/v3/repos/collaborators/#add-collaborator)                                 |\n| `remove_collaborator(repo, user)`                        | `HTTP.Response`                | [remove `user` as a collaborator from `repo`](https://developer.github.com/v3/repos/collaborators/#remove-collaborator)                         |\n| `collaborator_permission(repo, user)`                    | `HTTP.Response`                | [get the `repo` permission of a collaborator](https://developer.github.com/v3/repos/collaborators/#get-repository-permissions-for-a-user)       |\n| `stats(repo, stat[, attempts = 3])`                      | `HTTP.Response`                | [get information on `stat` (e.g. \"contributors\", \"code_frequency\", \"commit_activity\", etc.)](https://developer.github.com/v3/repos/statistics/) |\n| `topics(repo)`                                           | `Vector{String}`               | [get the list of topics of a repository.)](https://docs.github.com/en/rest/repos/repos#get-all-repository-topics)                               |\n| `set_topics(repo, topics)`                               | `Vector{String}`               | [set the list of topics of a repository.)](https://docs.github.com/en/rest/repos/repos#replace-all-repository-topics)                           |\n| `commit(repo, sha)`                                      | `Commit`                       | [get the commit specified by `sha`](https://developer.github.com/v3/repos/commits/#get-a-single-commit)                                         |\n| `commits(repo)`                                          | `Tuple{Vector{Commit}, Dict}`  | [get `repo`'s commits](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)                                             |\n| `commits(repo, pr)`                                      | `Tuple{Vector{Commit}, Dict}`  | [get `pr`'s commits for `repo`](https://docs.github.com/en/rest/reference/pulls#list-commits-on-a-pull-request)                                 |\n| `compare(repo, base, head)`                              | `Comparison`                   | [compare `repo`'s commits](https://docs.github.com/en/rest/commits/commits#compare-two-commits)                                                 |\n| `branch(repo, branch)`                                   | `Branch`                       | [get the branch specified by `branch`](https://developer.github.com/v3/repos/#get-branch)                                                       |\n| `branches(repo)`                                         | `Tuple{Vector{Branch}, Dict}`  | [get `repo`'s branches](https://developer.github.com/v3/repos/#list-branches)                                                                   |\n| `file(repo, path)`                                       | `Content`                      | [get the file specified by `path`](https://developer.github.com/v3/repos/contents/#get-contents)                                                |\n| `directory(repo, path)`                                  | `Tuple{Vector{Content}, Dict}` | [get the contents of the directory specified by `path`](https://developer.github.com/v3/repos/contents/#get-contents)                           |\n| `create_file(repo, path)`                                | `Dict`                         | [create a file at `path` in `repo`](https://developer.github.com/v3/repos/contents/#create-a-file)                                              |\n| `update_file(repo, path)`                                | `Dict`                         | [update a file at `path` in `repo`](https://developer.github.com/v3/repos/contents/#update-a-file)                                              |\n| `delete_file(repo, path)`                                | `Dict`                         | [delete a file at `path` in `repo`](https://developer.github.com/v3/repos/contents/#delete-a-file)                                              |\n| `permalink(content::Content, commit)`                    | `URIs.URI`                     | [get a permalink for `content` at the SHA specified by `commit`](https://help.github.com/articles/getting-permanent-links-to-files/)            |\n| `readme(repo)`                                           | `Content`                      | [get `repo`'s README](https://developer.github.com/v3/repos/contents/#get-the-readme)                                                           |\n| `create_status(repo, sha)`                               | `Status`                       | [create a status for the commit specified by `sha`](https://developer.github.com/v3/repos/statuses/#create-a-status)                            |\n| `statuses(repo, ref)`                                    | `Tuple{Vector{Status}, Dict}`  | [get the statuses posted to `ref`](https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref)                            |\n| `status(repo, ref)`                                      | `Status`                       | [get the combined status for `ref`](https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref)                 |\n| `create_webhook(owner, repo)`                            | `Webhook`                      | [create a webhook for `repo`](https://developer.github.com/v3/repos/hooks/#create-a-hook)                                                       |\n| `secrets(repo; auth)`                                    | `Tuple{Vector{Secret}, Dict}`  | [get names of all secrets for `repo`](https://developer.github.com/v3/actions/secrets/#list-repository-secrets)                                 |\n| `secret(repo, name; auth)`                               | `Secret`                       | [get status of secret in `repo`](https://developer.github.com/v3/actions/secrets/#get-a-repository-secret)                                      |\n| `create_secret(repo, name; value, auth)`                 | `nothing`                      | [create a secret for `repo`](https://developer.github.com/v3/actions/secrets/#create-or-update-a-repository-secret)                             |\n| `delete_secret(repo, name; auth)`                        | `nothing`                      | [delete a secret for `repo`](https://developer.github.com/v3/actions/secrets/#delete-a-repository-secret)                                       |\n| `deploykeys(repo; auth)`                                 | `Tuple{Vector{DeployKey}, Dict}`| [get all deploy keys for `repo`](https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#list-deploy-keys)                        |\n| `deploykey(repo, key; auth)`                             | `DeployKey`                    | [get the deploy `key` in `repo`](https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-a-deploy-key)                         |\n| `create_deploykey(repo; params=..., auth)`               | `nothing`                      | [create a deploy key for `repo`](https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#create-a-deploy-key)                      |\n| `delete_deploykey(repo, key; auth)`                      | `nothing`                      | [delete a deploy key for `repo`](https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#delete-a-deploy-key)                      |\n| `releases(repo, key; auth)`                      | `nothing`                      | [get the releases for `repo`](https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#list-releases)                      |\n\n#### Pull Requests and Issues\n\n| method                          | return type                             | documentation                                                                                                     |\n|---------------------------------|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| `pull_request(repo, pr)`        | `PullRequest`                           | [get the pull request specified by `pr`](https://developer.github.com/v3/pulls/#get-a-single-pull-request)        |\n| `pull_requests(repo)`           | `Tuple{Vector{PullRequest}, Dict}`      | [get `repo`'s pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)                           |\n| `pull_request_files(repo, pr)`  | `Tuple{Vector{PullRequestFiles}, Dict}` | [get this `repo`'s `pr`'s file changes](https://docs.github.com/en/rest/reference/pulls#list-pull-requests-files) |\n| `create_pull_request(repo)`     | `PullRequest`                           | [create pull request in `repo`](https://developer.github.com/v3/pulls/#create-a-pull-request)                     |\n| `update_pull_request(repo, pr)` | `PullRequest`                           | [update the given `pr` in `repo`](https://developer.github.com/v3/pulls/#update-a-pull-request)                   |\n| `close_pull_request(repo, pr)`  | `PullRequest`                           | [close the given `pr` in `repo`](https://developer.github.com/v3/pulls/#update-a-pull-request)                    |\n| `issue(repo, issue)`            | `Issue`                                 | [get the issue specified by `issue`](https://developer.github.com/v3/issues/#get-a-single-issue)                  |\n| `issues(repo)`                  | `Tuple{Vector{Issue}, Dict}`            | [get `repo`'s issues](https://developer.github.com/v3/issues/#list-issues-for-a-repository)                       |\n| `create_issue(repo)`            | `Issue`                                 | [create an issue in `repo`](https://developer.github.com/v3/issues/#create-an-issue)                              |\n| `edit_issue(repo, issue)`       | `Issue`                                 | [edit `issue` in `repo`](https://developer.github.com/v3/issues/#edit-an-issue)                                   |\n| `reviews(repo, pr)`             | `Tuple{Vector{PullRequest}, Dict}`      | [get a `pr`'s reviews](https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request)             |\n| `dismiss_review(repo, review)`  | `HTTP.Response`                         | [dismiss `review` in `repo`](https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review)        |\n\n#### Comments\n\n| method                                   | return type                    | documentation                                                                                                                                                        |\n|------------------------------------------|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `comment(repo, comment, :issue)`         | `Comment`                      | [get an issue `comment` from `repo`](https://developer.github.com/v3/issues/comments/#get-a-single-comment)                                                          |\n| `comment(repo, comment, :pr)`            | `Comment`                      | [get a PR `comment` from `repo`](https://developer.github.com/v3/issues/comments/#get-a-single-comment)                                                              |\n| `comment(repo, comment, :review)`        | `Comment`                      | [get an review `comment` from `repo`](https://developer.github.com/v3/pulls/comments/#get-a-single-comment)                                                          |\n| `comment(repo, comment, :commit)`        | `Comment`                      | [get a commit `comment` from `repo`](https://developer.github.com/v3/repos/comments/#get-a-single-commit-comment)                                                    |\n| `comments(repo, issue, :issue)`          | `Tuple{Vector{Comment}, Dict}` | [get the comments on `issue` in `repo`](https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue)                                                  |\n| `comments(repo, pr, :pr)`                | `Tuple{Vector{Comment}, Dict}` | [get the comments on `pr` in `repo`](https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue)                                                     |\n| `comments(repo, pr, :review)`            | `Tuple{Vector{Comment}, Dict}` | [get the review comments on `pr` in `repo`](https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request)                                         |\n| `comments(repo, commit, :commit)`        | `Tuple{Vector{Comment}, Dict}` | [get the comments on `commit` in `repo`](https://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit)                                          |\n| `create_comment(repo, issue, :issue)`    | `Comment`                      | [create a comment on `issue` in `repo`](https://developer.github.com/v3/issues/comments/#create-a-comment)                                                           |\n| `create_comment(repo, pr, :pr)`          | `Comment`                      | [create a comment on `pr` in `repo`](https://developer.github.com/v3/issues/comments/#create-a-comment)                                                              |\n| `create_comment(repo, pr, :review)`      | `Comment`                      | [create a review comment on `pr` in `repo`](https://developer.github.com/v3/pulls/comments/#create-a-comment)                                                        |\n| `create_comment(repo, commit, :commit)`  | `Comment`                      | [create a comment on `commit` in `repo`](https://developer.github.com/v3/repos/comments/#create-a-commit-comment)                                                    |\n| `edit_comment(repo, comment, :issue)`    | `Comment`                      | [edit the issue `comment` in `repo`](https://developer.github.com/v3/issues/comments/#edit-a-comment)                                                                |\n| `edit_comment(repo, comment, :pr)`       | `Comment`                      | [edit the PR `comment` in `repo`](https://developer.github.com/v3/issues/comments/#edit-a-comment)                                                                   |\n| `edit_comment(repo, comment, :review)`   | `Comment`                      | [edit the review `comment` in `repo`](https://developer.github.com/v3/pulls/comments/#edit-a-comment)                                                                |\n| `edit_comment(repo, comment, :commit)`   | `Comment`                      | [edit the commit `comment` in `repo`](https://developer.github.com/v3/repos/comments/#update-a-commit-comment)                                                       |\n| `delete_comment(repo, comment, :issue)`  | `HTTP.Response`                | [delete the issue `comment` from `repo`](https://developer.github.com/v3/issues/comments/#delete-a-comment)                                                          |\n| `delete_comment(repo, comment, :pr)`     | `HTTP.Response`                | [delete the PR `comment` from `repo`](https://developer.github.com/v3/issues/comments/#delete-a-comment)                                                             |\n| `delete_comment(repo, comment, :review)` | `HTTP.Response`                | [delete the review `comment` from `repo`](https://developer.github.com/v3/pulls/comments/#delete-a-comment)                                                          |\n| `delete_comment(repo, comment, :commit)` | `HTTP.Response`                | [delete the commit`comment` from `repo`](https://developer.github.com/v3/repos/comments/#delete-a-commit-comment)                                                    |\n| `delete_comment(repo, comment, :commit)` | `HTTP.Response`                | [delete the commit`comment` from `repo`](https://developer.github.com/v3/repos/comments/#delete-a-commit-comment)                                                    |\n| `reply_to(repo, review, comment, body)`  | `HTTP.Response`                | [reply to the `comment` (of `review` in `repo`) creating a new comment with the specified `body`](https://developer.github.com/v3/pulls/comments/#alternative-input) |\n\n#### Labels\n\n\n| method                                   | return type                    | documentation                                                                                                                                                        |\n|------------------------------------------|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `labels(repo,issue)`                     | `Vector{Label}`                | [list labels from `issue`](https://docs.github.com/en/rest/reference/issues#list-labels-for-an-issue)                                                                |\n| `add_labels(repo, issue, labels)`        | `Vector{Label}`                | [add labels to an `issue`](https://docs.github.com/en/rest/reference/issues#add-labels-to-an-issue)                                                                  |\n| `set_labels(repo, issue, labels)`        | `Vector{Label}`                | [set the labels for an `issue`](https://docs.github.com/en/rest/reference/issues#set-labels-for-an-issue)                                                            |\n| `remove_all_labels(repo, issue)`         | `HTTP.Response`                | [remove all labels from an `issue`](https://docs.github.com/en/rest/reference/issues#remove-all-labels-from-an-issue)                                                |\n| `remove_label(repo, issue, label)`       | `HTTP.Response`                | [remove a label from an `issue`](https://docs.github.com/en/rest/reference/issues#remove-a-label-from-an-issue)                                                      |\n\n#### Social Activity\n\n| method             | return type                  | documentation                                                                                                            |\n|--------------------|------------------------------|--------------------------------------------------------------------------------------------------------------------------|\n| `star(repo)`       | `HTTP.Response`              | [star `repo`](https://developer.github.com/v3/activity/starring/#star-a-repository)                                      |\n| `unstar(repo)`     | `HTTP.Response`              | [unstar `repo`](https://developer.github.com/v3/activity/starring/#unstar-a-repository)                                  |\n| `stargazers(repo)` | `Tuple{Vector{Owner}, Dict}` | [get `repo`'s stargazers](https://developer.github.com/v3/activity/starring/#list-stargazers)                            |\n| `starred(user)`    | `Tuple{Vector{Repo}, Dict}`  | [get repositories starred by `user`](https://developer.github.com/v3/activity/starring/#list-repositories-being-starred) |\n| `watchers(repo)`   | `Tuple{Vector{Owner}, Dict}` | [get `repo`'s watchers](https://developer.github.com/v3/activity/watching/#list-watchers)                                |\n| `watched(user)`    | `Tuple{Vector{Repo}, Dict}`  | [get repositories watched by `user`](https://developer.github.com/v3/activity/watching/#list-repositories-being-watched) |\n| `watch(repo)`      | `HTTP.Response`              | [watch `repo`](https://developer.github.com/v3/activity/watching/#set-a-repository-subscription)                         |\n| `unwatch(repo)`    | `HTTP.Response`              | [unwatch `repo`](https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription)                    |\n\n#### Gists\n\n| method                   | return type                 | documentation                                                                                                             |\n|--------------------------|-----------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| `gist(id)`               | `Gist`                      | [get the gist specified by `id`](https://developer.github.com/v3/gists/#get-a-single-gist)                                |\n| `gist(id, revision)`     | `Gist`                      | [get the gist specified by `id` and `revision`](https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist) |\n| `gists()`                | `Tuple{Vector{Gist}, Dict}` | [get all public gists](https://developer.github.com/v3/gists/#list-all-public-gists)                                      |\n| `gists(owner)`           | `Tuple{Vector{Gist}, Dict}` | [get all gists for `owner`](https://developer.github.com/v3/gists/#list-a-users-gists)                                    |\n| `create_gist()`          | `Gist`                      | [create a gist](https://developer.github.com/v3/gists/#create-a-gist)                                                     |\n| `edit_gist(gist)`        | `Gist`                      | [edit a gist](https://developer.github.com/v3/gists/#edit-a-gist)                                                         |\n| `delete_gist(gist)`      | `HTTP.Response`             | [delete a gist](https://developer.github.com/v3/gists/#delete-a-gist)                                                     |\n| `create_gist_fork(gist)` | `Gist`                      | [fork a gist](https://developer.github.com/v3/gists/#fork-a-gist)                                                         |\n| `gist_forks(gist)`       | `Tuple{Vector{Gist}, Dict}` | [list the forks of a gist](https://developer.github.com/v3/gists/#list-gist-forks)                                        |\n| `star_gist(gist)`        | `HTTP.Response`             | [star `gist`](https://developer.github.com/v3/gists/#star-a-gist)                                                         |\n| `starred_gists()`        | `Tuple{Vector{Gist}, Dict}` | [get the starred `gist`s](https://developer.github.com/v3/gists/#list-starred-gists)                                      |\n| `unstar_gist(gist)`      | `HTTP.Response`             | [unstar `gist`](https://developer.github.com/v3/gists/#unstar-a-gist)                                                     |\n\n#### Git Data\n\n| method                   | return type         | documentation                                                                                          |\n|--------------------------|---------------------|--------------------------------------------------------------------------------------------------------|\n| `blob(repo, sha)`        | `Blob`              | [Look up a blob in the `repo` by its SHA](https://developer.github.com/v3/git/blobs/#get-a-blob)       |\n| `create_blob(repo)`      | `Blob`              | [Create a blob in the `repo`](https://developer.github.com/v3/git/blobs/#create-a-blob)                |\n| `gitcommit(repo, sha)`   | `GitCommit`         | [Look up a commit in the `repo` by its SHA](https://developer.github.com/v3/git/commits/#get-a-commit) |\n| `create_gitcommit(repo)` | `GitCommit`         | [Create a commit in the `repo`](https://developer.github.com/v3/git/commits/#create-a-commit)          |\n| `tree(repo, sha)`        | `Tree`              | [Look up a tree in the `repo` by its SHA](https://developer.github.com/v3/git/trees/#get-a-tree)       |\n| `create_tree(repo)`      | `Tree`              | [Create a tree in the `repo`](https://developer.github.com/v3/git/trees/create-a-tree)                 |\n| `tag(repo, sha)`         | `Tag`               | [Look up a tag in the `repo` by its name](https://docs.github.com/en/rest/reference/git#get-a-tag)     |\n| `create_tag(repo)`       | `Tag`               | [Create a tag in the `repo`](https://docs.github.com/en/rest/reference/git#create-a-tag-object)        |\n| `reference(repo, name)`  | `Reference`         | [Look up a ref in the `repo` by its name](https://developer.github.com/v3/git/refs/#get-a-reference)   |\n| `references(repo)`       | `Vector{Reference}` | [Get all `refs ` of the repo](https://developer.github.com/v3/git/refs/#get-all-references)            |\n| `create_reference(repo)` | `Reference`         | [Create a reference in the `repo`](https://developer.github.com/v3/git/refs/#create-a-reference)       |\n| `update_reference(repo)` | `Reference`         | [Update a reference in the `repo`](https://developer.github.com/v3/git/refs/#create-a-reference)       |\n| `delete_reference(repo)` | `GitCommit`         | [Delete a the `repo`](https://developer.github.com/v3/git/refs/#delete-a-reference)                    |\n| `tag(repo)`              | `Reference`         | [Update a reference in the `repo`](https://developer.github.com/v3/git/refs/#create-a-reference)       |\n| `delete_reference(repo)` | `GitCommit`         | [Delete a the `repo`](https://developer.github.com/v3/git/refs/#delete-a-reference)                    |\n\n#### GitHub Apps\n| method                   | return type                 | documentation                                                                                                                                  |\n|--------------------------|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| `app(id)`                | `App`                       | [get the GitHub app with the specified `id`](https://developer.github.com/v3/apps/#get-a-single-github-app)                                    |\n| `app(slug)`              | `App`                       | [get the GitHub app with the specified `slug`](https://developer.github.com/v3/apps/#get-a-single-github-app)                                  |\n| `app(;auth=auth)`        | `App`                       | [get the GitHub app authenticated by the corresponding `auth`](https://developer.github.com/v3/apps/#get-the-authenticated-github-app)         |\n| `installations(auth)`    | `Vector{Installation}`      | [get the installations for the GitHub app authenticated by the corresponding `auth`](https://developer.github.com/v3/apps/#find-installations) |\n| `repos(i::Installation)` | `Tuple{Vector{Repo}, Dict}` | [get the active repositories for this installation](https://developer.github.com/v3/apps/#find-installations)                                  |\n\n#### GitHub Check Runs\n| method                                        | return type | documentation                                                                                               |\n|-----------------------------------------------|-------------|-------------------------------------------------------------------------------------------------------------|\n| `create_check_run(repo; params=...)`          | `CheckRun`  | [Create a new check run](https://developer.github.com/v3/checks/runs/#create-a-check-run)                   |\n| `update_check_run(repo, id::Int; params=...)` | `CheckRun`  | [Update the check run with the given `id`](https://developer.github.com/v3/checks/runs/#update-a-check-run) |\n\n\n#### Licenses\n| method                            | return type       | documentation                                                                                                                                 |\n| --------------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| `licenses(; params=...)`          | `Vector{License}` | [Get all commonly used licenses](https://docs.github.com/en/free-pro-team@latest/rest/reference/licenses#get-all-commonly-used-licenses)      |\n| `license(license_id; params=...)` | `License`         | [Get a license](https://docs.github.com/en/free-pro-team@latest/rest/reference/licenses#get-a-license)                                        |\n| `repo_license(repo; params=...)`  | `Content`         | [Get the license for a respository](https://docs.github.com/en/free-pro-team@latest/rest/reference/licenses#get-the-license-for-a-repository) |\n\n#### Miscellaneous\n\n| method                | return type | documentation                                                                                                |\n|-----------------------|-------------|--------------------------------------------------------------------------------------------------------------|\n| `rate_limit()`        | `Dict`      | [get your rate limit status](https://developer.github.com/v3/rate_limit/#get-your-current-rate-limit-status) |\n| `authenticate(token)` | `OAuth2`    | [validate `token` and return an authentication object](https://developer.github.com/v3/#authentication)      |\n\n#### Keyword Arguments\n\nAll REST methods accept the following keyword arguments:\n\n| keyword        | type                   | default value            | description                                                                                   |\n|----------------|------------------------|--------------------------|-----------------------------------------------------------------------------------------------|\n| `auth`         | `GitHub.Authorization` | `GitHub.AnonymousAuth()` | The request's authorization                                                                   |\n| `params`       | `Dict`                 | `Dict()`                 | The request's query parameters                                                                |\n| `headers`      | `Dict`                 | `Dict()`                 | The request's headers. Note that these headers will be mutated by GitHub.jl request methods.  |\n| `handle_error` | `Bool`                 | `true`                   | If `true`, a Julia error will be thrown in the event that GitHub's response reports an error. |\n| `page_limit`   | `Real`                 | `Inf`                    | The number of pages to return (only applies to paginated results, obviously)                  |\n\n## Authentication\n\nTo authenticate your requests to GitHub, you'll need to generate an appropriate [access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use). Then, you can do stuff like the following (this example assumes that you set an environmental variable `GITHUB_AUTH` containing the access token):\n\n```julia\nimport GitHub\nmyauth = GitHub.authenticate(ENV[\"GITHUB_AUTH\"]) # don't hardcode your access tokens!\nGitHub.star(\"JuliaWeb/GitHub.jl\"; auth = myauth)  # star the GitHub.jl repo as the user identified by myauth\n```\n\nAs you can see, you can propagate the identity/permissions of the `myauth` token to GitHub.jl's methods by passing `auth = myauth` as a keyword argument.\n\nNote that if authentication is not provided, they'll be subject to the restrictions GitHub imposes on unauthenticated requests (such as [stricter rate limiting](https://developer.github.com/v3/#rate-limiting))\n\n### Authenticating as a GitHub app\n\nGitHub apps (formerly called integrations) have [their own authentication format](https://developer.github.com/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/)\nbased on [JSON Web Tokens](https://jwt.io/). When creating a GitHub app, you will be\nprompted to download your app's private key. You can use this private key to\nauthenticate as a Github App using the `JWTAuth` type:\n```\nappauth = JWTAuth(1234, \"privkey.pem\") # Replace with your app id/privkey file\n```\n\nThe following shows a complete example that opens an issue on every repository\non which your application gets installed:\n\n```\nlistener = GitHub.EventListener() do event\n    # On installation, open an issue on every repository we got installed in\n    if event.kind == \"installation\"\n        # Authenticate as the application\n        appauth = GitHub.JWTAuth(1234, \"privkey.pem\")\n        # Now, get permissions for this particular installation\n        installation = Installation(event.payload[\"installation\"])\n        auth = create_access_token(installation, appauth)\n        for repo in event.payload[\"repositories\"]\n            create_issue(GitHub.Repo(repo), auth=auth,\n                params = Dict(\n                    :title =\u003e \"Hello World\",\n                    :body =\u003e \"Thank you for installing me - I needed that\"\n            ))\n        end\n    end\n    return HTTP.Response(200)\nend\nGitHub.run(listener, host=IPv4(0,0,0,0), port=8888)\n```\n\n## Pagination\n\nGitHub will often [paginate](https://developer.github.com/v3/#pagination) results for requests that return multiple items. On the GitHub.jl side of things, it's pretty easy to see which methods return paginated results by referring to the [REST Methods documentation](#rest-methods); if a method returns a `Tuple{Vector{T}, Dict}`, that means its results are paginated.\n\nPaginated methods return both the response values, and some pagination metadata. You can use the `per_page`/`page` query parameters and the `page_limit` keyword argument to configure result pagination.\n\nFor example, let's request a couple pages of GitHub.jl's PRs, and configure our result pagination to see how it works:\n\n```julia\n# show all PRs (both open and closed), and give me 3 items per page starting at page 2\njulia\u003e myparams = Dict(\"state\" =\u003e \"all\", \"per_page\" =\u003e 3, \"page\" =\u003e 2);\n\njulia\u003e prs, page_data = pull_requests(\"JuliaWeb/GitHub.jl\"; params = myparams, page_limit = 2);\n\njulia\u003e prs # 3 items per page * 2 page limit == 6 items, as expected\n6-element Array{GitHub.PullRequest,1}:\n GitHub.PullRequest(44)\n GitHub.PullRequest(43)\n GitHub.PullRequest(42)\n GitHub.PullRequest(41)\n GitHub.PullRequest(39)\n GitHub.PullRequest(38)\n\njulia\u003e page_data\nDict{String,String} with 4 entries:\n  \"prev\"  =\u003e \"https://api.github.com/repositories/16635105/pulls?page=2\u0026per_page=3\u0026state=all\"\n  \"next\"  =\u003e \"https://api.github.com/repositories/16635105/pulls?page=4\u0026per_page=3\u0026state=all\"\n  \"first\" =\u003e \"https://api.github.com/repositories/16635105/pulls?page=1\u0026per_page=3\u0026state=all\"\n  \"last\"  =\u003e \"https://api.github.com/repositories/16635105/pulls?page=7\u0026per_page=3\u0026state=all\"\n```\n\nIn the above, `prs` contains the results from page 2 and 3. We know this because we specified page 2 as our starting page (`\"page\" =\u003e 2`), and limited the response to 2 pages max (`page_limit = 2`). In addition, we know that exactly 2 pages were actually retrieved, since there are 6 items and we said each page should only contain 3 items (`\"per_page\" =\u003e 3`).\n\nThe values provided by `page_data` are the same values that are included in the [Link header](https://developer.github.com/v3/#link-header) of the last requested item. You can continue paginating by starting a new paginated request at one of these links using the `start_page` keyword argument:\n\n```julia\n# Continue paging, starting with `page_data[\"next\"]`.\n# Note that the `params` kwarg can't be used here because\n# the link passed to `start_page` has its own parameters\njulia\u003e prs2, page_data2 = pull_requests(\"JuliaWeb/GitHub.jl\"; page_limit = 2, start_page = page_data[\"next\"]);\n\njulia\u003e prs2\n6-element Array{GitHub.PullRequest,1}:\n GitHub.PullRequest(37)\n GitHub.PullRequest(34)\n GitHub.PullRequest(32)\n GitHub.PullRequest(30)\n GitHub.PullRequest(24)\n GitHub.PullRequest(22)\n\njulia\u003e page_data2\nDict{String,String} with 4 entries:\n  \"prev\"  =\u003e \"https://api.github.com/repositories/16635105/pulls?page=4\u0026per_page=3\u0026state=all\"\n  \"next\"  =\u003e \"https://api.github.com/repositories/16635105/pulls?page=6\u0026per_page=3\u0026state=all\"\n  \"first\" =\u003e \"https://api.github.com/repositories/16635105/pulls?page=1\u0026per_page=3\u0026state=all\"\n  \"last\"  =\u003e \"https://api.github.com/repositories/16635105/pulls?page=7\u0026per_page=3\u0026state=all\"\n```\n\n## Handling Webhook Events\n\nGitHub.jl comes with configurable `EventListener` and `CommentListener` types that can be used as basic servers for parsing and responding to events delivered by [GitHub's repository Webhooks](https://developer.github.com/webhooks/).\n\n#### `EventListener`\n\nWhen an `EventListener` receives an event, it performs some basic validation and wraps the event payload (and some other data) in [a `WebhookEvent` type](https://github.com/JuliaWeb/GitHub.jl/blob/master/src/activity/events/events.jl). This `WebhookEvent` instance, along with the provided `Authorization`, is then fed to the server's handler function, which the user defines to determine the server's response behavior. The handler function is expected to return an `HTTP.Response` that is then sent back to GitHub.\n\nThe `EventListener` constructor takes the following keyword arguments:\n\n- `auth`: GitHub authorization (usually with repo-level permissions).\n- `secret`: A string used to verify the event source. If the event is from a GitHub Webhook, it's the Webhook's secret. If a secret is not provided, the server won't validate the secret signature of incoming requests.\n- `repos`: A vector of `Repo`s (or fully qualified repository names) listing all acceptable repositories. All repositories are whitelisted by default.\n- `events`: A vector of [event names](https://developer.github.com/webhooks/#events) listing all acceptable events (e.g. [\"commit_comment\", \"pull_request\"]). All events are whitelisted by default.\n- `forwards`: A vector of `URIs.URI`s (or URI strings) to which any incoming requests should be forwarded (after being validated by the listener)\n\nHere's an example that demonstrates how to construct and run an `EventListener` that does benchmarking on every commit and PR:\n\n```julia\nimport GitHub\nimport URIs\n# EventListener settings\nmyauth = GitHub.authenticate(ENV[\"GITHUB_AUTH\"])\nmysecret = ENV[\"MY_SECRET\"]\nmyevents = [\"pull_request\", \"push\"]\nmyrepos = [GitHub.Repo(\"owner1/repo1\"), \"owner2/repo2\"] # can be Repos or repo names\nmyforwards = [URIs.URI(\"http://myforward1.com\"), \"http://myforward2.com\"] # can be URIs.URIs or URI strings\n\n# Set up Status parameters\npending_params = Dict(\n    \"state\" =\u003e \"pending\",\n    \"context\" =\u003e \"Benchmarker\",\n    \"description\" =\u003e \"Running benchmarks...\"\n)\n\nsuccess_params = Dict(\n    \"state\" =\u003e \"success\",\n    \"context\" =\u003e \"Benchmarker\",\n    \"description\" =\u003e \"Benchmarks complete!\"\n)\n\nerror_params(err) = Dict(\n    \"state\" =\u003e \"error\",\n    \"context\" =\u003e \"Benchmarker\",\n    \"description\" =\u003e \"Error: $err\"\n)\n\n# We can use Julia's `do` notation to set up the listener's handler function\nlistener = GitHub.EventListener(auth = myauth,\n                                secret = mysecret,\n                                repos = myrepos,\n                                events = myevents,\n                                forwards = myforwards) do event\n    kind, payload, repo = event.kind, event.payload, event.repository\n\n    if kind == \"pull_request\" \u0026\u0026 payload[\"action\"] == \"closed\"\n        return HTTP.Response(200)\n    end\n\n    if event.kind == \"push\"\n        sha = event.payload[\"after\"]\n    elseif event.kind == \"pull_request\"\n        sha = event.payload[\"pull_request\"][\"head\"][\"sha\"]\n    end\n\n    GitHub.create_status(repo, sha; auth = myauth, params = pending_params)\n\n    try\n        # run_and_log_benchmarks isn't actually a defined function, but you get the point\n        run_and_log_benchmarks(event, \"\\$(sha)-benchmarks.csv\")\n    catch err\n        GitHub.create_status(repo, sha; auth = myauth, params = error_params(err))\n        return HTTP.Response(500)\n    end\n\n    GitHub.create_status(repo, sha; auth = myauth, params = success_params)\n\n    return HTTP.Response(200)\nend\n\n# Start the listener on localhost at port 8000\nGitHub.run(listener, IPv4(127,0,0,1), 8000)\n```\n\n#### `CommentListener`\n\nA `CommentListener` is a special kind of `EventListener` that allows users to pass data to the listener's handler function via commenting. This is useful for triggering events on repositories that require configuration settings.\n\nA `CommentListener` automatically filters out all non-comment events, and then checks the body of each comment event against a trigger `Regex` supplied by the user. If a match is found in the comment, then the `CommentListener` calls its handler function, passing it the event and the corresponding `RegexMatch`.\n\nThe `CommentListener` constructor takes the following keyword arguments:\n\n- `auth`: same as `EventListener`\n- `secret`: same as `EventListener`\n- `repos`: same as `EventListener`\n- `forwards`: same as `EventListener`\n- `check_collab`: If `true`, only acknowledge comments made by repository collaborators. Note that, if `check_collab` is `true`, `auth` must have the appropriate permissions to query the comment's repository for the collaborator status of the commenter. `check_collab` is `true` by default.\n- `use_access_token`: If `check_collab` is set to `true` and `auth` is using JWT authentication for GitHub Apps, then set this to `true`.\n\nFor example, let's set up a silly `CommentListener` that responds to the commenter with a greeting. To give a demonstration of the desired behavior, if a collaborator makes a comment like:\n\n```\nMan, I really would like to be greeted today.\n\n`sayhello(\"Bob\", \"outgoing\")`\n```\n\nWe want the `CommentLister` to reply:\n\n```\nHello, Bob, you look very outgoing today!\n```\n\nHere's the code that will make this happen:\n\n```julia\nimport GitHub\n\n# CommentListener settings\ntrigger = r\"`sayhello\\(.*?\\)`\"\nmyauth = GitHub.authenticate(ENV[\"GITHUB_AUTH\"])\nmysecret = ENV[\"MY_SECRET\"]\n\n# We can use Julia's `do` notation to set up the listener's handler function.\n# Note that, in our example case, `phrase` will be \"`sayhello(\\\"Bob\\\", \\\"outgoing\\\")`\"\nlistener = GitHub.CommentListener(trigger; auth = myauth, secret = mysecret) do event, phrase\n    # In our example case, this code sets name to \"Bob\" and adjective to \"outgoing\"\n    name, adjective = matchall(r\"\\\".*?\\\"\", phrase)\n    comment_params = Dict(\"body\" =\u003e \"Hello, $name, you look very $adjective today!\")\n\n    # Parse the original comment event for all the necessary reply info\n    comment = GitHub.Comment(event.payload[\"comment\"])\n\n    if event.kind == \"issue_comment\"\n        comment_kind = :issue\n        reply_to = event.payload[\"issue\"][\"number\"]\n    elseif event.kind == \"commit_comment\"\n        comment_kind = :commit\n        reply_to = comment.commit_id\n    elseif event.kind == \"pull_request_review_comment\"\n        comment_kind = :review\n        reply_to = event.payload[\"pull_request\"][\"number\"]\n        # load required query params for review comment creation\n        comment_params[\"commit_id\"] = comment.commit_id\n        comment_params[\"path\"] = comment.path\n        comment_params[\"position\"] = comment.position\n    end\n\n    # send the comment creation request to GitHub\n    GitHub.create_comment(event.repository, reply_to, comment_kind; auth = myauth, params = comment_params)\n\n    return HTTP.Response(200)\nend\n\n# Start the listener on localhost at port 8000\nGitHub.run(listener, IPv4(127,0,0,1), 8000)\n```\n\n## GitHub Enterprise\n\nThis library work with github.com, and also with self-hosted github, a.k.a. GitHub Enterprise.\n\nTo use it with self-hosted github, you need to create `GitHubWebAPI` structure and pass it to functions when needed.\nFollowing example shows obtaining repository info `private/Package.jl` on github instance with API `https://git.company.com/api/v3`.\n\n```julia\nimport GitHub\nimport URIs\n\napi = GitHub.GitHubWebAPI(URIs.URI(\"https://git.company.com/api/v3\"))\nmyauth = GitHub.authenticate(api, ENV[\"GITHUB_AUTH\"])\nmyrepo = GitHub.repo(api, \"private/Package.jl\", auth=myauth)\n```\n\n## SSH keys\n\nYou can generate public-private key pairs with `GitHub.genkeys`. Here's an example adding a deploy key and secret, in this case to deploy documentation via GitHub Actions:\n\n```julia\npubkey, privkey = GitHub.genkeys()\ncreate_deploykey(repo; auth, params=Dict(\"key\"=\u003epubkey, \"title\"=\u003e\"Documenter\", \"read_only\"=\u003efalse))\ncreate_secret(repo, \"DOCUMENTER_KEY\"; auth, value=privkey)\n```\n\n`privkey` is sent in encrypted form to GitHub. Do **not** share `privkey` with others or post it publicly;\ndoing so breaches the security of your repository.\nYou can [read more](https://www.ssh.com/ssh/public-key-authentication) about the meaning of SSH keys and their security implications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJuliaWeb%2FGitHub.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJuliaWeb%2FGitHub.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJuliaWeb%2FGitHub.jl/lists"}