GitHub Integration
Connect GitHub to give your assistant access to repositories, pull requests, commits, and code.
What’s included
With GitHub connected, your assistant can:
- List repositories — See accessible repos
- Read files — Access code and configuration
- Create/update files — Make changes (with commits)
- List commits — See recent activity
- List pull requests — Track PRs
- Create pull requests — Open new PRs
Connecting GitHub
- Go to Integrations
- Find GitHub and click Connect
- Authorize Town on GitHub
- Select which repos to grant access to (or all)
- Return to Town
You can limit access to specific repositories during the GitHub authorization flow. Town only sees repos you explicitly grant access to.
GitHub tools
Once connected, these tools become available:
| Tool | Description | Write? |
|---|---|---|
github_list_repos | List accessible repositories | No |
github_get_file | Read file contents | No |
github_create_or_update_file | Create or modify files | Yes |
github_list_commits | List recent commits | No |
github_list_pull_requests | List PRs in a repo | No |
github_create_pull_request | Create a new PR | Yes |
Write tools (create_or_update_file, create_pull_request) create real commits and PRs. Use approval-required mode for workflows with these tools.
Use cases
GitHub Reports workflow
Monitor repository activity:
- Daily digest of commits and PRs
- Highlight stale PRs
- Track what shipped
See GitHub Reports for the stock workflow.
PR review reminder
Find PRs waiting for your review:
- Search for review requests
- Filter by age
- Daily reminder list
Code watch
Monitor for specific changes:
- Watch for changes to critical files
- Alert on dependency updates
- Track configuration changes
Automated documentation
Keep docs in sync:
- Update changelogs from commits
- Generate release notes
- Sync documentation with code
Example: List recent PRs
A workflow with github_list_pull_requests might:
Search for open PRs in the main repository and summarize:
- PR title and author
- Days open
- Review status
- Priority based on labelsConfiguration
Repository access
During GitHub authorization, you choose:
- All repositories — Full access to everything
- Selected repositories — Only specific repos
You can change this in GitHub settings later.
Permissions
Town requests:
- Repository access — Read code, issues, PRs
- Write access — Create files, PRs (if enabled)
Best practices
Start read-only. Begin with workflows that only read (list repos, commits, PRs). Add write capabilities later.
Use approval-required for writes. Any workflow that can create commits or PRs should require approval.
Limit repository access. Only grant access to repos the workflow actually needs.
Troubleshooting
”Repository not found”
- Check if the repo is included in your GitHub authorization
- Verify the repo name is correct
- Private repos require explicit access
Permission denied on write
- Ensure your GitHub token has write access
- Check repository branch protection rules
- Verify you have push access to the repo