Use Cases
- Monitor repositories for new commits
- Track file changes and code modifications
- Generate commit summaries and changelogs
- Trigger workflows on push events
- Send notifications about repository activity
- Create automated code review reminders
Configuration
GitHub Authentication
Your GitHub Personal Access Token (PAT). This token authenticates your requests to the GitHub API.Required Scopes:
repo- Full control of private repositoriesadmin:repo_hook- Full control of repository hooks (for webhook setup)
- Go to GitHub Settings → Developer settings → Personal access tokens
- Click “Generate new token (classic)”
- Select required scopes
- Generate and copy the token
Repository Settings
The repository to monitor in
owner/repo format.Examples:facebook/reactmicrosoft/vscodeyour-username/your-repo
The branch to monitor for commits.Default:
mainCommon values: main, master, develop, stagingWebhook Configuration
The GitHub Reader can set up webhooks to trigger your workflow automatically when new commits are pushed.Automatically generated webhook URL. Click “Set Up Webhook” to create.
Automatically generated secret used to verify webhook payloads from GitHub.
Webhooks allow real-time workflow triggering instead of polling. Set up a webhook to execute your workflow immediately when commits are pushed.
Output Structure
The GitHub Reader provides comprehensive repository and commit data.The repository name in
owner/repo format.The branch that was monitored.
Array of commit objects with detailed information about each commit.
The commit SHA identifier (40-character hash).
The commit message.
The commit author’s name and email.
ISO 8601 timestamp of when the commit was made.
Direct URL to view the commit on GitHub.
Array of files changed in this commit.
Name/path of the file that was changed.
Status of the change:
added, modified, or removed.Number of lines added to this file.
Number of lines deleted from this file.
A summary of changes in the repository.
The GitHub username of the person who pushed the changes.
Example Output
Usage Examples
Commit Notification Bot
Workflow: Send Discord notifications for new commits-
GitHub Reader
- Repository:
company/main-app - Branch:
main - Webhook: Set up webhook
- Repository:
-
Discord Messenger
- Message:
Automated Commit Summary
Workflow: Generate and email daily commit summaries-
GitHub Reader
- Repository:
team/project - Branch:
develop
- Repository:
-
Text Generator
- Model:
gpt-4-turbo - Prompt:
- Model:
-
Gmail Sender
- To:
[email protected] - Subject:
Daily Commit Summary - {{repoName}} - Body:
- To:
Code Review Reminder
Workflow: Notify team when large commits are made-
GitHub Reader
- Repository:
company/critical-service - Branch:
main - Webhook: Enabled
- Repository:
-
Text Generator
- Prompt:
-
Discord Messenger (conditional)
- Message:
Release Notes Generator
Workflow: Generate release notes from commits-
GitHub Reader
- Repository:
company/product - Branch:
main
- Repository:
-
Text Generator
- Model:
claude-3-sonnet-20240229 - Prompt:
- Model:
-
Gmail Sender
- To:
[email protected] - Subject:
Release Notes - {{repoName}} - Body:
{{text}}
- To:
Webhook Setup
Automatic Setup
- Enter your GitHub token and repository information
- Click “Set Up Webhook”
- The webhook URL and secret are automatically generated
- The webhook is registered with GitHub
- Your workflow will now trigger on new commits
Manual Setup
If automatic setup fails, you can manually configure the webhook:- Go to your GitHub repository
- Navigate to Settings → Webhooks → Add webhook
- Enter the webhook URL from Agility
- Set Content type to
application/json - Enter the webhook secret from Agility
- Select “Just the push event”
- Click “Add webhook”
Best Practices
Token Security
- Create tokens with minimal required permissions
- Rotate tokens regularly
- Use different tokens for different workflows
- Revoke unused tokens immediately
Repository Monitoring
- Monitor specific branches (main, production) rather than all branches
- Use webhooks for real-time triggering instead of polling
- Set up separate workflows for different repositories
Commit Processing
- Process commits in batches when appropriate
- Filter commits by file paths or commit messages
- Use Text Generator to extract relevant information
- Combine with other agents for comprehensive automation
Performance
- GitHub API has rate limits (5,000 requests/hour for authenticated requests)
- Use webhooks to avoid unnecessary API calls
- Cache commit data when possible
Error Handling
Common errors and solutions:- GitHub access token is required: Enter a valid personal access token
- Repository name is required: Provide repository in
owner/repoformat - Invalid token: Verify token hasn’t expired and has correct permissions
- Repository not found: Check repository name and token permissions
- Webhook setup failed: Ensure token has
admin:repo_hookscope - Rate limit exceeded: Wait for rate limit reset or use webhook triggering
Testing
Test Agent
Retrieves recent commits from the repository immediately. Displays commit information, file changes, and metadata.Test Workflow
Executs the entire workflow with real commit data, showing how commits flow through subsequent agents.Limitations
- GitHub API rate limits apply (5,000 requests/hour)
- Webhook payloads are limited to 25MB
- Historical commits are limited to recent activity
- Large repositories may have longer processing times
- Binary files are detected but content is not provided