Issues
Issues track bugs, tasks, and feature requests with discussion in one place.
Issues are GitHub's built-in tracker for bugs, ideas, and to-dos. Each issue has a title, a description, a discussion thread, and can be assigned to people.
Handy features
- Reference an issue anywhere by typing
#number. - Close an issue automatically from a PR with keywords like
Closes #12in the description. - Use issue templates to gather consistent bug reports.
- Mention teammates with
@username.
Example
# Create an issue from the terminal
gh issue create --title "Login button misaligned" \
--body "On mobile the button overflows its container."
# List open issues
gh issue listWhen to use it
- A user reports a bug by opening a GitHub issue with reproduction steps, letting the team triage and assign it to a developer.
- A product manager tracks a new feature request as an issue and links it to a milestone so the team can plan the sprint.
- A developer closes an issue automatically by including 'Closes #55' in a commit message, connecting code change to the ticket.
More examples
Create an issue from the terminal
Opens a new issue with a label and self-assignment directly from the command line.
gh issue create \
--title "Login page crashes on Safari 17" \
--body "Steps to reproduce: 1. Open Safari 17. 2. Navigate to /login." \
--label "bug" \
--assignee "@me"List and filter open issues
Filters the issue list by label and assignee to quickly focus on the tickets you own.
# List open bugs assigned to you
gh issue list --label bug --assignee @me
# List all open issues in a milestone
gh issue list --milestone "v2.0"Close an issue via commit message
When this commit lands on the default branch, GitHub automatically closes issue #55 and links the commit in the issue timeline.
git commit -m "fix: prevent null dereference on login
Closes #55"
Discussion