Prerequisites
Choose a connection based on the identity your Expert should use:Connect the GitHub App
A Cosmos tenant admin must set up the team connection. The installer also needs permission to install the App on the target GitHub organization.- Open Settings → Connectors → Browse Connectors and search for GitHub.
- Select the GitHub App connector and click Add installation. If GitHub Enterprise Cloud configuration is also shown, choose Add GitHub.com installation.
- Complete the GitHub installation flow for the Augment Code GitHub App and select the repositories it can access.
- Return to the connector page and click Refresh to check the installation and repository list.
Installing the App does not automatically grant access to every repository. To change repository access later, open the installation’s actions menu (3 dots) on the connector page, choose Open on GitHub, and update the repository selection there.
Connect your personal GitHub account
- Open Settings → Personal → Linked Accounts.
- On the GitHub card, click Connect and complete the OAuth flow.
Enabling GitHub as a Tool on an Expert
- Open Settings > Experts, select your Expert, and edit it.
- In Tools → Integrations, turn off Automatically include all managed integrations if you want to choose specific integrations.
- Select GitHub App for the shared bot connection, or the personal GitHub integration to act as the session owner.
- Save the Expert.
- GitHub App →
github-app-api, authenticated with the GitHub App installation token - Personal GitHub →
github-api, authenticated with the session owner’s OAuth token
method defaults to GET. summary is required and surfaces in run logs and the Expert UI. Set details: true to receive the full GitHub response payload instead of the trimmed default.
GitHub’s
/issues endpoints return both issues and pull requests. Filter on pull_request != null in the response if you only want one or the other.Configuring GitHub Triggers
You shouldn’t manually edit triggers. Always use Cosmos Advisor for that.
- Open Settings > Automations and click Create automation.
- Select the existing Expert you want to run.
- Choose GitHub as the Trigger source and enter a Trigger name.
- Select an Event using a GitHub webhook event name from the list below. If the event is not a preset, choose Custom event type and enter its name, such as
issue_comment. - Optionally add a Filter — a JSONLogic expression evaluated against the raw GitHub webhook payload. The trigger fires only when the filter returns true.
- Click Save.
action, repository, sender, pull_request, issue, comment, ref, head_commit, workflow_run, installation.
Available event types:
- Pull requests:
pull_request,pull_request_review,pull_request_review_comment - Issues:
issues,issue_comment - Code:
push - CI / checks:
check_suite,status,workflow_run,workflow_job,workflow_dispatch
PRs Ready for Review
Pick Event typepull_request and use this filter to fire on direct opens of non-draft PRs and on ready_for_review transitions out of draft:
Push to main
Pick Event typepush and filter on the ref and repository:
Slash Command in a PR or Issue Comment
To match/augment <something> in a comment, pick Event type issue_comment and filter:
Workflow Failure on main
Pick Event typeworkflow_run and filter on the conclusion and branch:
Common Filter Recipes
Disabling GitHub Access
You can scale back GitHub access at three levels, from least to most disruptive:- Pause or remove a trigger. Open Settings > Automations, select the automation, and use its Triggers controls to disable or remove the trigger. The Expert keeps its GitHub API tool.
- Remove GitHub from an Expert. Disable or remove its GitHub triggers first. Open Settings > Experts and edit the Expert. Under Tools → Integrations, turn off Automatically include all managed integrations if enabled, deselect the GitHub integration, and save.
- Remove a connection. For personal OAuth, click Disconnect on the GitHub card in Settings → Personal → Linked Accounts. For the team App, open Settings → Connectors, select GitHub App, and use the installation’s actions menu to Open on GitHub and uninstall the App. An admin can also choose Remove installation and complete the confirmation. Removing an installation affects every Expert and automation that relies on it.