Link GitHub Commits to Tasks | Auto-Traceability
Auto-link commits and PRs to GitScrum tasks using task IDs (GS-123). Task status updates on PR merge. Works with GitHub and GitLab integrations.
5 min read
Without automatic linking, developers must manually update tasks when code is committed, leading to outdated task status and missing context. GitScrum's GitHub integration automatically connects commits and PRs to tasks, providing real-time visibility into code progress.
Integration Benefits
| Without Integration | With Integration |
|---|---|
| Manual status updates | Auto-update on PR |
| No code visibility | Commits on task |
| Duplicate information | Single source of truth |
| Lost context | Full history |
Setup Process
GitHub App Installation
GITHUB INTEGRATION SETUP
ββββββββββββββββββββββββ
STEP 1: Install GitHub App
βββββββββββββββββββββββββββββββββββββ
GitScrum Settings β Integrations β GitHub
Click "Install GitHub App"
Select organization/repos
Authorize permissions
STEP 2: Configure Repositories
βββββββββββββββββββββββββββββββββββββ
Choose repositories to connect
Map repos to GitScrum projects
Set default behaviors
STEP 3: Set Linking Rules
βββββββββββββββββββββββββββββββββββββ
Task ID pattern: GS-[0-9]+
Branch pattern: feature/GS-[0-9]+-*
Auto-transition: Enabled
PERMISSIONS REQUIRED:
βββ Read repository contents
βββ Read/write issues
βββ Read/write pull requests
βββ Read commit status
βββ Webhooks
Project Mapping
REPOSITORY β PROJECT MAPPING
ββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GitHub Repository β GitScrum Project β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β acme/frontend β Acme Website β
β acme/backend-api β Acme Website β
β acme/mobile-app β Acme Mobile App β
β acme/shared-libs β (All projects) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
MULTI-REPO PROJECT:
βββ Multiple repos β one project
βββ PRs show on related tasks
βββ Context across codebase
Commit Linking
Commit Message Format
COMMIT MESSAGE PATTERNS
βββββββββββββββββββββββ
STANDARD FORMAT:
GS-123: Brief description
EXAMPLES:
βββββββββββββββββββββββββββββββββββββ
GS-456: Add user authentication flow
GS-456: Fix token refresh bug
GS-789: Update dashboard styles
βββββββββββββββββββββββββββββββββββββ
MULTIPLE TASKS:
GS-123, GS-124: Shared refactoring
CONVENTIONAL COMMITS + TASK:
feat(auth): GS-123 add OAuth support
fix(api): GS-456 handle null response
PATTERNS RECOGNIZED:
βββ GS-123
βββ GS-123:
βββ [GS-123]
βββ (GS-123)
βββ Fixes GS-123
What Gets Linked
LINKED DATA ON TASK
βββββββββββββββββββ
TASK VIEW:
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Task: GS-456 Implement user login β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Status: In Review β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β CODE β
β βββββ β
β Branch: feature/GS-456-user-login β
β β
β Commits (3): β
β βββ abc123: Initial auth setup β
β βββ def456: Add password validation β
β βββ ghi789: Fix edge cases β
β β
β Pull Request: β
β βββ #234: Add user authentication β
β βββ Status: Review requested β
β βββ Checks: β All passing β
β βββ Reviews: 1/2 approved β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Branch Integration
Branch Naming Convention
BRANCH NAMING PATTERNS
ββββββββββββββββββββββ
RECOMMENDED FORMAT:
type/GS-[task-id]-brief-description
EXAMPLES:
βββ feature/GS-123-user-authentication
βββ fix/GS-456-login-bug
βββ chore/GS-789-update-dependencies
βββ hotfix/GS-999-critical-fix
AUTO-DETECTED PATTERNS:
βββ GS-123-*
βββ feature/GS-123-*
βββ */GS-123-*
βββ GS-123/*
BRANCH β TASK LINK:
βββ Auto-creates link when pushed
βββ Shows branch on task
βββ Tracks branch status
βββ Links to repo
Branch Creation Workflow
BRANCH FROM TASK
ββββββββββββββββ
FROM GITSCRUM:
1. Open task
2. Click "Create Branch"
3. Select repository
4. Branch auto-named: feature/GS-123-task-title
5. Copy git command
6. Checkout locally
GIT COMMAND PROVIDED:
git checkout -b feature/GS-123-task-title
BENEFITS:
βββ Consistent naming
βββ Auto-linked immediately
βββ No manual formatting
βββ Less typos
Pull Request Integration
PR Linking
PULL REQUEST LINKING
ββββββββββββββββββββ
AUTO-LINK WHEN:
βββ PR title contains GS-[id]
βββ PR branch contains GS-[id]
βββ PR description contains GS-[id]
βββ Commits reference GS-[id]
PR TEMPLATE (recommended):
βββββββββββββββββββββββββββββββββββββ
## Related Task
GS-123
## Changes
- Description of changes
## Testing
- How to test
## Screenshots (if applicable)
βββββββββββββββββββββββββββββββββββββ
Status Automation
PR β TASK STATUS AUTOMATION
βββββββββββββββββββββββββββ
RULE 1: PR Opened
βββββββββββββββββββββββββββββββββββββ
Trigger: PR opened with GS-[id]
Action: Move task to "In Review"
Assign: Add PR reviewers as watchers
RULE 2: PR Approved
βββββββββββββββββββββββββββββββββββββ
Trigger: Required reviews approved
Action: Add label "approved"
Update: Task shows approval status
RULE 3: PR Merged
βββββββββββββββββββββββββββββββββββββ
Trigger: PR merged to main
Actions:
βββ Move task to "Done"
βββ Add label "shipped"
βββ Close task (optional)
βββ Notify stakeholders
RULE 4: PR Closed (not merged)
βββββββββββββββββββββββββββββββββββββ
Trigger: PR closed without merge
Action: Move task back to "In Progress"
Alert: Notify task owner
CI/CD Integration
Build Status
CI STATUS ON TASK
βββββββββββββββββ
TASK VIEW SHOWS:
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Build Status β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PR #234: Add authentication β
β βββ β lint (passed) β
β βββ β test (passed) β
β βββ β build (passed) β
β βββ β deploy-preview (ready) β
β β
β Preview: https://preview-234.app.dev β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
FAILURE HANDLING:
βββ Build fails β Task flagged
βββ Notification to assignee
βββ Auto-label "build-failed"
βββ Blocks merge automation
Best Practices
For Git Integration
Anti-Patterns
INTEGRATION MISTAKES:
β Forgetting task IDs in commits
β Multiple tasks per branch
β Manual status updates
β Not using PR templates
β Ignoring CI integration
β Not mapping all repos