
GitAgent
Pricing
Pay per usage

GitAgent
**Tired of manually syncing your open-source repos?** Let our powerful agent handle it for you! Just enter the details, and it will automatically sync all your repos with their corresponding parent repos—keeping them up-to-date with the latest code, effortlessly. 🚀
0.0 (0)
Pricing
Pay per usage
0
Monthly users
2
Runs succeeded
>99%
Last modified
a month ago
GitHub Fork Updater
An Apify actor that automatically updates your forked GitHub repositories to sync with their upstream repositories. This actor supports both GitHub API and browser automation approaches.
Features
- Automatically detects and updates all forked repositories for a given GitHub user
- Supports both GitHub API and browser automation methods
- Rate limiting and concurrency control to avoid API limits
- Detailed logging of all operations
- Configurable execution parameters
- Comprehensive error handling with retry logic for transient errors
- Detailed dataset output with sync results for each repository
Input Configuration
The actor accepts the following input parameters:
1{ 2 "githubToken": "your-github-token", 3 "targetUsername": "your-github-username", 4 "useGithubApi": true, 5 "maxConcurrency": 3 6}
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
githubToken | string | Yes | - | GitHub personal access token with repo scope |
targetUsername | string | Yes | - | GitHub username whose forks need to be updated |
useGithubApi | boolean | No | true | Whether to use GitHub API (true) or browser automation (false) |
maxConcurrency | number | No | 3 | Maximum number of concurrent repository updates |
GitHub Token Setup
- Go to GitHub Settings > Developer settings > Personal access tokens
- Generate a new token with the
repo
scope - Copy the token and use it in the actor input
Usage
- Create a new task in Apify Console
- Set up the input configuration according to your needs
- Run the task
The actor will:
- Authenticate with GitHub
- Fetch all repositories for the target user
- Filter for forked repositories
- Update each fork with changes from its upstream repository
- Log the results of each operation
- Store detailed results in the actor's dataset
Dataset Output
The actor stores detailed information about each repository sync operation in its dataset. Each record includes:
1{ 2 "repository_name": "username/repo-name", 3 "timestamp": "2023-02-09T10:00:00.000Z", 4 "sync_status": true|false, 5 "error": "Error message (only present if sync_status is false)" 6}
You can access this dataset in the Apify Console after the actor run completes, or programmatically using the Apify API.
Implementation Details
The actor provides two methods for updating forks:
GitHub API Method (Recommended)
- Uses the official GitHub REST API via Octokit
- Faster and more reliable
- Subject to API rate limits
- More efficient resource usage
- Implements retry logic with exponential backoff for transient errors
Browser Automation Method
- Uses Puppeteer for browser automation
- More resilient to API changes
- Can handle cases where API access is limited
- Slower than the API method
- Implements multiple authentication strategies for reliability
Authentication Methods
The actor supports multiple authentication methods:
- GitHub API Authentication: Uses the GitHub token directly with the Octokit client
- Browser Authentication:
- First attempts token-based authentication via localStorage
- Falls back to API-based authentication if needed
- Includes verification steps to ensure successful authentication
Error Handling
The actor implements comprehensive error handling:
- Individual repository failures don't stop the entire process
- Rate limiting is handled automatically with exponential backoff
- Transient errors are retried with increasing delays
- All errors are logged for debugging
- Error details are stored in the dataset output
- Cleanup is performed even if errors occur
Limitations
- GitHub API rate limits apply
- Browser automation may break if GitHub's UI changes
- Token must have appropriate permissions
- Large numbers of forks may take time to process
Pricing
Pricing model
Pay per usageThis Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage.