Setup
1
Install the GitHub Extension
To install the GitHub extension, run:
2
Configure Browser OAuth (Preferred)
Create a GitHub OAuth app at github.com/settings/apps
and set its callback URL to the IronClaw OAuth callback URL your gateway uses.Then supply the app credentials through the GitHub extension’s setup flow under
Extensions in the web interface. They are stored in the encrypted
secret store.Now authenticate:Complete the GitHub OAuth flow from Extensions in the web interface. The resulting token is stored encrypted.
3
Configure a PAT (Fallback)
If you do not want to run a GitHub OAuth app, you can still use a Personal Access Token.
Supply it in the GitHub extension’s setup flow under Extensions in the
web interface instead of the OAuth sign-in. It is stored in the encrypted
secret store.
Available Actions:
Here are some of the actions your agent can perform with the GitHub extension:get_repo: Retrieve repository informationlist_issues: List all issues in a repositorycreate_issue: Create a new issueget_issue: Get details of a specific issueupdate_issue: Update issue fields, labels, and assigneeslist_issue_comments: List comments on an issuecreate_issue_comment: Add a comment to an issueadd_issue_labels/remove_issue_label: Add or remove issue labelsadd_issue_assignees/remove_issue_assignees: Add or remove issue assigneeslist_pull_requests: List pull requestscreate_pull_request: Create a new pull requestget_pull_request: Get details of a specific pull requestget_pull_request_files: Get the list of files in a pull requestcreate_pr_review: Submit a pull request reviewlist_pull_request_comments: List review comments on a pull requestlist_pull_request_review_threads: List inline review threads on a pull requestreply_pull_request_comment: Reply to a pull request review commentget_pull_request_reviews: Get reviews for a pull requestupdate_pull_request: Update pull request metadataresolve_review_thread/unresolve_review_thread: Change inline review thread stateget_combined_status: Get the combined status for a refmerge_pull_request: Merge a pull requestget_authenticated_user: Get the authenticated GitHub userlist_repos: List authenticated repositoriesget_file_content: Retrieve the content of a file in the repotrigger_workflow: Manually trigger a GitHub Actions workflowget_workflow_runs: List recent workflow runsget_workflow_run_jobs: List jobs for a workflow runget_workflow_run_artifacts: List artifacts for a workflow runrerun_failed_workflow_run_jobs/rerun_workflow_job: Rerun GitHub Actions jobshandle_webhook: Handle a GitHub webhook payload
Working on Public Repositories
Lets configure our agent to have its own github account, which it can use to create issues and comment on PRs in public repositories.1
Create a new GitHub account
Go to https://github.com and create a new account for your agent. If you are already logged in with your personal account you will need to briefly log out to create the new account, but you can log back in right after
2
Generate a Personal Access Token
On the agent’s GitHub account, go to Settings -> Developer settings -> Personal access tokens -> Tokens (classic) and generate a new token (classic) with the following permissions:
repo -> public_repo3
Authenticate the GitHub Extension
Now that you have either OAuth app credentials or a PAT, authenticate the GitHub extension:If you configured OAuth app credentials in the extension’s setup flow, IronClaw uses
browser OAuth. Otherwise it falls back to a Personal Access Token.
4
Test it out!
Ask your agent to create a test issue in one of your public repositories, and check if the issue was created successfully.