Merge Requests
Merge Requests are the core of iForge's code review, deeply integrated with the task system.
Workflow
- Create MR: Select source branch and target branch, automatically populate commit logs as title and description
- Code Review: Line-by-line comments, review status (approve/request changes)
- Conflict Detection: Automatically detect merge conflicts
- Merge: Support direct merge, Squash merge, Rebase merge
🔗 Integration with Tasks
The integration of MRs with the task system is iForge's core feature:
Create MR from Task
- Create MR directly from the task details page, source branch is automatically populated
- MR description automatically associates with task number
- Task status automatically transitions to "Completed" after merge
Commit Association
Reference task numbers in commit messages to automatically associate with MR:
git commit -m "Fix login issue #TASK-12"
git commit -m "Add unit tests #TASK-12"
Bidirectional Traceability
- View MR from Task: Task details page shows associated merge requests
- View Task from MR: MR details page shows associated task list
Fork Contribution
Any logged-in user can create MRs from their Fork to the upstream repository without being a project member (consistent with GitHub behavior).
MR Details Page
Uses GitHub-style Tab layout:
- Conversation: Timeline, comments, status changes
- Commits: Commit list
- Checks: CI/CD check status
- Files Changed: Split diff view
Review Process
- Approve: Review passed, can merge
- Request Changes: Needs modification, prevents merge
- Comment: Comment only, does not prevent merge
Merge Strategies
| Strategy | Description | Applicable Scenarios |
|---|---|---|
| Direct Merge | Preserves all commit history | Need complete history |
| Squash Merge | Compresses into a single commit | Keep main branch clean |
| Rebase Merge | Fast-forward merge after rebase | Linear history |
Auto-close Issues
After merging, associated Issues can be automatically closed (use Closes #123 or Fixes #123 in the description).