Skip to main content

Merge Requests

Merge Requests are the core of iForge's code review, deeply integrated with the task system.

Workflow

  1. Create MR: Select source branch and target branch, automatically populate commit logs as title and description
  2. Code Review: Line-by-line comments, review status (approve/request changes)
  3. Conflict Detection: Automatically detect merge conflicts
  4. 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

StrategyDescriptionApplicable Scenarios
Direct MergePreserves all commit historyNeed complete history
Squash MergeCompresses into a single commitKeep main branch clean
Rebase MergeFast-forward merge after rebaseLinear history

Auto-close Issues

After merging, associated Issues can be automatically closed (use Closes #123 or Fixes #123 in the description).