In simple words
- Issue: a ticket for a bug, task or idea.
- Project board: a table or Kanban view to plan and track issues and pull requests.
- Issue template: a pre-filled form so people report issues with the right details.
- Linking: writing "Fixes #12" in a pull request closes issue 12 when it merges.
Big picture
An issue is a to-do note attached to your repo: a bug, an idea or a task. A project board shows many issues as cards in columns, like sticky notes on a wall. Together they answer, "what are we working on, and who is doing it?"
Parts of an issue
| Part | Use |
|---|---|
| Title and description | What is wrong or wanted |
| Labels | Tags such as bug, docs, good first issue |
| Assignee | The person doing the work |
| Milestone | A goal with a date, such as "v1.2" |
| Number | Every issue gets one, like #12 |
Work with issues from the terminal
gh issue create --title "Login fails on Safari" --body "Steps: ..." --label buggh issue list --label buggh issue edit 12 --add-assignee @megh issue close 12Creating issue in acme/apphttps://github.com/acme/app/issues/12Issue templates
A template is a form that guides people to write a good issue. Put a file in .github/ISSUE_TEMPLATE/bug.yml:
name: Bug reportdescription: Something is brokenlabels: [bug]body: - type: textarea id: steps attributes: label: Steps to reproduce validations: required: trueProject boards
A GitHub Project is a board or table made from issues and pull requests.
| View | Looks like |
|---|---|
| Board | Columns: Todo, In progress, Done |
| Table | A spreadsheet you can sort and filter |
| Roadmap | A timeline by date |
Projects can move cards for you. For example, when a pull request is merged, the card moves to Done.
Link issues to code
Write Closes #12 in a pull request. When it is merged, issue 12 closes by itself.
Write an issue people can act on
A good issue answers four questions: what happened, what you expected, how to repeat it, and where it happened.
Title: Login fails on Safari 17What happened: The page stays blank after I click "Sign in".What I expected: The dashboard opens.Steps: 1) Open /login in Safari 17 2) Enter a valid user 3) Click "Sign in"Where: macOS 14, Safari 17.2Task lists
Inside an issue, write a list with - [ ]. GitHub shows tick boxes and counts the progress for you.
- [x] Reproduce the bug- [ ] Fix the redirect- [ ] Add a testOn the issue list you will see 1 of 3 tasks. Use this to split a big task into small ones.
Milestones: planning a release
A milestone groups issues under one goal and a date, such as "v1.2 on 15 Dec". GitHub shows a progress bar.
gh issue list --milestone "v1.2"gh issue edit 12 --milestone "v1.2"Showing 2 of 2 open issues in acme/app that match your search#12 Login fails on Safari bug about 1 hour ago#15 Add dark mode enhancement about 2 days agoAutomate the board
Projects have built-in workflows. Turn them on in the project's Workflows menu:
| When this happens | The card goes to |
|---|---|
| Issue is added | Todo |
| Pull request is opened | In progress |
| Pull request is merged | Done |
| Issue is closed | Done |
You can also use a GitHub Actions workflow to add every new issue to a project, which is covered later in the course.
Common mistakes
- Issues with a title like "bug" and no steps.
- Too many labels nobody understands. Keep a short list.
- Forgetting to close issues, so the board fills with old cards.
Summary
- Issues track work, labels sort it, assignees own it.
- Templates make issues useful.
- Boards show the whole team's progress.
Closes #Nlinks code to the issue.
CHECK YOUR UNDERSTANDING
3 quick questions
1. What does writing 'Closes #12' in a pull request do?
2. What are labels for?
3. Which project view looks like columns of cards?
You've finished the free preview of GitHub & GitHub Actions
Upgrade to Pro to unlock the remaining 17 lessons, every practice lab and a certificate when you finish.
See plans