Git & GitHub Course
Git & GitHub
/
Intermediate

Issue Templates

Definition

Files placed in a repository that customize and standardize the form users see when they open a new Issue or Pull Request.

Explain Like I'm New

If you don't use templates, users will open issues that just say 'IT BROKE!!!' with no context. Issue Templates force them to fill out a structured form (e.g., 'What browser are you using?', 'Steps to reproduce').

Real World Example

When you click 'New Issue' on a popular open-source repo, you are presented with options: 'Report a Bug', 'Request a Feature', or 'Ask a Question'. Clicking one pre-fills the text box with a checklist you MUST complete.

Common Use Cases

  • •Standardizing bug reports
  • •Saving maintainer time

Interactive Example

Interview Questions

basic

  • In which hidden directory do you usually store Issue Template files?

intermediate

  • Can you use YAML forms instead of Markdown for templates?

Flash Cards

Question

Which directory?

Click to reveal answer
Answer

Inside the `.github/ISSUE_TEMPLATE/` directory at the root of your project.

Question

YAML forms?

Click to reveal answer
Answer

Yes! GitHub recently introduced Issue Forms. By writing YAML instead of Markdown, you can create actual UI inputs, dropdown menus, and required checkboxes that users must fill out before submitting.