GitHub API
Read repositories, branches, issues, pull requests, and files, then run bounded repository workflows
GitHub API gives a project server-side access to repository data. It is separate from the GitHub connection used to sync a Swarmz project with a repository.
Before you connect
A Swarmz administrator must create a dedicated GitHub OAuth App for this connector. Do not reuse the project-sync OAuth App: GitHub OAuth Apps accept one callback URL, and the two flows use different callbacks. Enter the client ID and secret on the GitHub API OAuth application admin card, use the callback URL shown there, test the connection, then enable the connector.
With read access, GitHub exposes public repositories available to the user. GitHub's classic repo scope grants both read and write access to public and private repositories; it cannot grant private source-code read access without write access. Request write access only when the workflow needs private repositories or repository changes.
Available operations
| Operation | What it does | Limit per minute |
|---|---|---|
list_repositories | Lists repositories visible to the authorized user | 30 |
list_branches | Lists branches in one repository | 30 |
list_issues | Lists repository issues | 30 |
list_pull_requests | Lists pull requests | 30 |
get_file | Reads one file or directory listing | 30 |
create_issue | Creates one issue | 15 |
add_issue_comment | Comments on an issue or pull request | 15 |
update_file | Creates or updates one file with a commit message | 10 |
update_file accepts at most 5 MB of base64 content and rejects path traversal. Updating an existing file requires its current SHA from GitHub.
Connect and verify GitHub API
Ask the AI for a repository workflow, select Connect new, and approve the requested GitHub access.
- List repositories and confirm a disposable test repository.
- List its branches, issues, and pull requests.
- Read
README.md. - Create an issue named
Swarmz connector testand add a comment. - If file writes are required, create a test file on a test branch and confirm the commit in GitHub.
- Close the issue and remove the branch or test file in GitHub.
Organization SAML or OAuth restrictions can block an otherwise valid token. Authorize the OAuth App for the organization, then reconnect. Generated browser code must not call GitHub directly; the project server route calls the Swarmz connector gateway.