Fix Issue Github
Read a GitHub issue and apply code changes to resolve it.
Read a GitHub issue and apply code changes to resolve it.
$ARGUMENTS is the issue number. If $ARGUMENTS is empty, ask the user to provide an issue number and stop.
Steps:
- Check that
ghis installed and authenticated by runninggh auth status. If not, tell the user and stop. - Run
gh issue view $ARGUMENTS --json title,body,comments,labelsto fetch the issue details. If the issue doesn't exist or is already closed, tell the user and stop. - Analyse the issue:
- Read the title and body to understand what is being requested or what is broken.
- Read any comments for clarifications, additional context, or decisions already made.
- Identify whether this is a bug fix, feature addition, or documentation change.
- Explore the codebase to find the relevant files:
- Search for symbols, filenames, or patterns mentioned in the issue.
- Read the relevant files to understand the current implementation before making any changes.
- Apply the minimum code changes needed to resolve the issue:
- Fix bugs by correcting the root cause, not just the symptom.
- Add features by following the existing patterns and conventions in the codebase.
- Do not refactor or change code unrelated to the issue.
- Do not add comments, docstrings, or logging unless the issue specifically asks for it.
- After making changes, summarise what was changed and why, referencing specific files and line numbers. Ask the user to review the changes before committing.
- Do not commit or push — leave that to the user.
$ARGUMENTS