Overview
Dependify uses a “temporary staging fork” approach when working with repositories you don’t own. This guide explains the fork lifecycle, automatic detection logic, and cleanup process.Forks are only created for external repositories. If you own the repository, Dependify creates a branch directly in your repo—no fork needed.
The Temporary Staging Fork Concept
What is a Temporary Staging Fork?
A temporary staging fork is:- A short-lived fork created solely to propose changes via pull request
- Not intended for long-term use or independent development
- Safe to delete after the PR is merged or closed
- Automatically created by Dependify when modernizing external repositories
Why Forks Are Necessary
GitHub’s permission model requires forks for contributing to external repositories:Automatic Fork Detection Logic
Step-by-Step Detection Process
Dependify follows this logic when you submit a repository:Detection Step 1: Identify User
Detection Step 1: Identify User
Dependify queries GitHub’s API to get your authenticated username.
Detection Step 2: Check Ownership
Detection Step 2: Check Ownership
Compares your username with the repository owner (case-insensitive).
Detection Step 3: Check Existing Fork
Detection Step 3: Check Existing Fork
Looks for an existing fork under your account.
Detection Step 4: Create New Fork
Detection Step 4: Create New Fork
If no fork exists, creates a new one.
When Forks Are Created vs Direct PR
Decision Tree
Comparison Table
| Scenario | Fork Created? | Branch Location | PR Format |
|---|---|---|---|
| Your own repo | ❌ No | your-username/repo:dependify-xxx | repo (branch → main) |
| External repo (no fork) | ✅ Yes | your-username/repo:dependify-xxx | original-repo (fork:branch → main) |
| External repo (fork exists) | ♻️ Reused | your-username/repo:dependify-xxx | original-repo (fork:branch → main) |
Fork Lifecycle
1. Fork Creation
Automatic Process
Automatic Process
github.com/your-username/repo-nameWhat Gets Forked
What Gets Forked
- ✅ All branches (including default branch)
- ✅ Commit history
- ✅ Tags and releases
- ❌ Issues (not copied)
- ❌ Pull requests (not copied)
- ❌ Actions workflows (disabled by default)
2. Fork Usage
Dependify clones your fork (not the original repo) to ensure changes can be pushed without permission errors.
3. Pull Request Creation
PR is created from your fork to the original repository:4. Fork Cleanup (Optional)
After the PR is merged or closed, you can delete the fork:Fork Cleanup After PR is Merged
Manual Cleanup (Recommended)
You can manually delete forks through GitHub’s web interface:- Navigate to your fork:
github.com/your-username/repo-name - Click Settings (repository settings)
- Scroll to Danger Zone
- Click Delete this repository
- Confirm deletion by typing the repository name
When to Delete Your Fork
Safe to Delete
Safe to Delete
✅ PR has been merged into the original repository
✅ PR has been closed (rejected or abandoned)
✅ You don’t plan to contribute again soon
✅ All your changes are in the original repo
✅ PR has been closed (rejected or abandoned)
✅ You don’t plan to contribute again soon
✅ All your changes are in the original repo
Keep Your Fork If
Keep Your Fork If
⚠️ PR is still open and under review
⚠️ You plan to make more contributions to the same project
⚠️ You want to maintain your own version of the project
⚠️ Fork has additional branches you’re working on
⚠️ You plan to make more contributions to the same project
⚠️ You want to maintain your own version of the project
⚠️ Fork has additional branches you’re working on
Automated Cleanup (Future Feature)
Automated fork cleanup is on the roadmap for future versions of Dependify. Currently, you need to manually delete forks through GitHub.
Understanding PR Descriptions for Forked Repos
When Dependify creates a PR from a fork, the description includes fork-specific information:Common Fork Scenarios
Scenario 1: First-Time Contribution
Scenario 2: Fork Already Exists
Scenario 3: Multiple PRs from Same Fork
You can have multiple open PRs from the same fork by using different branch names. Each
dependify-xxxxx branch is unique.Troubleshooting Fork Issues
”Failed to create fork: 403 Forbidden”
Cause
Cause
Repository is private and you don’t have access.
Solution
Solution
- Ask the repository owner to add you as a collaborator
- Ensure you have read access to the repository
- For private repos, you need explicit permission
”Fork already exists (200 response)”
Cause
Cause
You’ve previously forked this repository.
Solution
Solution
- This is not an error—Dependify will use your existing fork
- If your fork is outdated, consider syncing it with the original repo first
- Alternatively, delete your fork and let Dependify create a fresh one
”Error pushing to remote”
Cause
Cause
Authentication failed or fork permissions issue.
Solution
Solution
- Verify your GitHub token has the
reposcope - Check that your fork isn’t archived or read-only
- Ensure you have push access to your own fork
”PR creation failed: Validation Failed”
Cause
Cause
Branch name collision or PR already exists for this branch.
Solution
Solution
- Check if a PR already exists for the same branch
- Close or merge existing PRs before creating new ones
- Delete the branch in your fork and retry
Best Practices for Fork Management
Keep Forks Organized
Keep Forks Organized
- Delete forks after PRs are merged
- Use descriptive branch names for your own changes
- Don’t mix Dependify branches with your manual work
Sync Forks Regularly
Sync Forks Regularly
If you plan to contribute multiple times:
Clean Up Old Branches
Clean Up Old Branches
Periodically review and delete old Dependify branches:
Related Documentation
- Repository Workflows - Understanding owned vs external repos
- Understanding Changelogs - Reading AI-generated PR descriptions
- Best Practices - Tips for effective modernization