Auto-Update Tasks on PR Merge | Git Integration Guide
Connect Git PR merges to automatic task updates. GitScrum recognizes task IDs in branches and moves tasks through workflow stages without manual updates.
5 min read
Developers shouldn't have to update task status manually after merging code. GitScrum's Git integration automatically moves tasks through workflow stages based on PR activity, keeping project state accurate without developer overhead.
The Manual Update Problem
| Without Automation | With Automation |
|---|---|
| Developer opens PR | Developer opens PR |
| Developer updates task to "Review" | Task auto-moves to "Review" |
| Reviewer approves | Reviewer approves |
| Developer updates task | Task auto-labeled "approved" |
| Developer merges PR | Developer merges PR |
| Developer updates task to "Done" | Task auto-moves to "Done" |
| **5 manual updates** | **0 manual updates** |
Setting Up Git Integration
Connection Setup
GIT INTEGRATION SETUP
βββββββββββββββββββββ
Step 1: Connect Repository
ββββββββββββββββββββββββββ
Platform: GitHub / GitLab / Bitbucket
Repository: company/product
Authentication: OAuth or Personal Access Token
Step 2: Configure Task ID Pattern
βββββββββββββββββββββββββββββββββ
Pattern: #(\d+)
Example matches: #123, #456
Alternative: TASK-(\d+) for TASK-123 format
Step 3: Enable Webhooks
βββββββββββββββββββββββ
Events to track:
βββ Branch created
βββ Pull request opened
βββ Pull request approved
βββ Pull request merged
βββ Pull request closed
Automation Rules
AUTOMATION RULES
ββββββββββββββββ
RULE 1: Branch Created
ββββββββββββββββββββββ
Trigger: Branch name contains task ID
Action: Move task to "In Progress"
Example: feature/#123-user-auth β Task #123 to In Progress
RULE 2: PR Opened
βββββββββββββββββ
Trigger: PR description contains task ID
Action:
βββ Move task to "In Review"
βββ Link PR to task
βββ Notify assigned reviewer
RULE 3: PR Approved
βββββββββββββββββββ
Trigger: PR receives required approvals
Action: Add "approved" label to task
RULE 4: PR Merged
βββββββββββββββββ
Trigger: PR merged to main/master
Action: Move task to "Done"
RULE 5: PR Closed Without Merge
βββββββββββββββββββββββββββββββ
Trigger: PR closed without merging
Action: Move task back to "In Progress"
Linking PRs to Tasks
In Branch Names
BRANCH NAMING CONVENTIONS
βββββββββββββββββββββββββ
Format: type/#task-id-short-description
Examples:
βββ feature/#123-user-authentication
βββ bugfix/#456-login-redirect-loop
βββ hotfix/#789-security-patch
βββ refactor/#234-cleanup-auth-module
GitScrum extracts: #123, #456, #789, #234
In PR Descriptions
PR DESCRIPTION TEMPLATE
βββββββββββββββββββββββ
## Description
Brief description of changes
## Related Tasks
Closes #123
Related to #124
## Type
- [x] Feature
- [ ] Bug fix
- [ ] Refactor
## Checklist
- [x] Tests added
- [x] Documentation updated
---
GitScrum detects: #123, #124
Workflow Integration
Complete Flow
DEVELOPER WORKFLOW
ββββββββββββββββββ
1. Pick task #123 from board
βββ Task already in "Ready"
2. Create branch: feature/#123-user-auth
βββ Task auto-moves to "In Progress"
3. Write code, commit, push
βββ Task stays in "In Progress"
4. Open PR mentioning #123
βββ Task auto-moves to "In Review"
βββ PR linked to task
5. Reviewer approves
βββ Task labeled "approved"
6. Merge PR
βββ Task auto-moves to "Done"
βββ PR shows as merged on task
No manual status updates needed!
Multiple Tasks per PR
MULTI-TASK PR
βββββββββββββ
PR Description:
"Implements user authentication system
Closes #123 (auth flow)
Closes #124 (password reset)
Related #125 (future: 2FA)"
Result:
βββ #123 β Done (when merged)
βββ #124 β Done (when merged)
βββ #125 β Unchanged (related, not closed)
Troubleshooting
Common Issues
TROUBLESHOOTING GUIDE
βββββββββββββββββββββ
TASK NOT UPDATING?
ββββββββββββββββββ
Check:
βββ Is task ID format correct? (#123 not #123)
βββ Is webhook enabled?
βββ Is repository connected?
βββ View integration logs in settings
WRONG TASK UPDATED?
βββββββββββββββββββ
Check:
βββ Correct task ID in branch/PR?
βββ Multiple tasks with same ID pattern?
βββ Manual override available
PR NOT LINKED?
ββββββββββββββ
Fix:
βββ Edit PR description to add task ID
βββ Or manually link from task page
βββ Automation triggers on description update
Best Practices
For Smooth Automation
Anti-Patterns
AVOID THESE:
β Branches without task IDs
β Typos in task IDs
β Manual status updates (defeats purpose)
β Ignoring failed automations
β Multiple unrelated tasks in one PR