github-issue-fix-flow
GitHub Issue Fix Flow
Section titled “GitHub Issue Fix Flow”Overview
Section titled “Overview”Resolve a GitHub issue from intake through fix, validation, and push using gh CLI, local edits, and git.
Workflow
Section titled “Workflow”1) Intake and Issue Context
Section titled “1) Intake and Issue Context”Get full issue context:
gh issue view <id> --commentsIf repo is unclear:
gh repo view --json nameWithOwnerCapture from the issue:
- Reproduction steps
- Expected behavior
- Maintainer notes or labels
- Related issues or PRs
2) Locate the Code Path
Section titled “2) Locate the Code Path”Search for relevant code:
# Find files related to the issuerg -n "keyword from issue"
# Find function definitionsrg -n "func relevantFunction"
# Find type definitionsrg -n "struct|class|enum RelevantType"Read relevant code paths and understand:
- Entry points
- Data flow
- Existing patterns and conventions
3) Implement the Fix
Section titled “3) Implement the Fix”Guidelines:
- Edit the minimal set of files
- Keep changes aligned with existing architecture and style
- Add tests when behavior changes and coverage is practical
- Follow repo-specific conventions (check CONTRIBUTING.md, AGENTS.md, CLAUDE.md)
4) Build and Test
Section titled “4) Build and Test”For Swift/Xcode projects:
# Buildswift build# orxcodebuild -scheme MyApp -destination 'platform=macOS' build
# Testswift test# orxcodebuild -scheme MyAppTests -destination 'platform=macOS' testFor other projects, use appropriate build/test commands.
Report warnings or failures - do not hide them.
5) Commit and Push
Section titled “5) Commit and Push”Check for unrelated changes:
git status --shortgit diffStage only the fix:
git add <specific files>Commit with closing message:
git commit -m "Fix: <description>
Closes #<issue number>"Push:
git push6) Report Back
Section titled “6) Report Back”Provide summary:
- What changed and where
- Test results (including any failures)
- Follow-ups or blocked items
Quick Reference
Section titled “Quick Reference”| Task | Command |
|---|---|
| View issue | gh issue view <id> --comments |
| List issues | gh issue list |
| View repo | gh repo view --json nameWithOwner |
| Create branch | git checkout -b fix/issue-<id> |
| Stage files | git add <files> |
| Commit | git commit -m "Fix: ... Closes #<id>" |
| Push | git push -u origin HEAD |
| Create PR | gh pr create --fill |
Commit Message Format
Section titled “Commit Message Format”Fix: Brief description of the fix
More detailed explanation if needed.- What was the problem- How it was fixed- Any notable changes
Closes #123Branch Naming
Section titled “Branch Naming”# Featuregit checkout -b feature/issue-123-add-feature
# Bug fixgit checkout -b fix/issue-123-fix-bug
# Refactorgit checkout -b refactor/issue-123-cleanupPR Workflow (Optional)
Section titled “PR Workflow (Optional)”If working on a branch for PR:
# Create branchgit checkout -b fix/issue-<id>
# Make changes, commitgit add .git commit -m "Fix: description (closes #<id>)"
# Push and create PRgit push -u origin HEADgh pr create --fillChecklist
Section titled “Checklist”- Issue context captured (repro steps, expected behavior)
- Code path located and understood
- Fix implemented with minimal changes
- Tests added/updated if applicable
- Build passes
- Tests pass
- Only relevant files staged
- Commit message includes
Closes #<id> - Changes pushed
- Summary provided