
Why add an issue template?
- Contributors otherwise see a blank description and may omit critical details.
- A structured form collects environment, reproduction steps, expected vs actual behavior, version, and logs up-front.
- Consistent reports improve triage speed and make issues easier to assign and resolve.
Best place to add the template
Put issue templates in the
.github/ISSUE_TEMPLATE/ directory. Name the file bug-report.yaml (or bug-report.yml). GitHub will render the YAML into a structured form when someone opens a new issue.Example bug report template
Place this file at.github/ISSUE_TEMPLATE/bug-report.yaml. GitHub renders the YAML as a form when creating a new issue.
Template field overview
Authoring and committing
- Create the file at
.github/ISSUE_TEMPLATE/bug-report.yamland commit to the default branch (commonlymain). - Verify the folder and filename are exact; GitHub requires the path to be
.github/ISSUE_TEMPLATE/to detect templates. - You can include multiple templates in the same directory (e.g.,
feature-request.yaml,security-report.yaml) to guide different kinds of issues.
What to expect in the GitHub UI
- When a contributor clicks “New issue”, GitHub shows available templates. Selecting ”🐛 Bug Report” opens a visual form built from the YAML.
- Required fields (e.g., reproduction steps, environment) are highlighted and cannot be submitted empty.
- The form allows attachments (screenshots, log files) and pre-populates labels specified in
labels.
Testing the template
- Commit
bug-report.yamlto your repository’s default branch. - Navigate to Issues → New issue.
- Choose the ”🐛 Bug Report” template and confirm the form fields match the YAML definition.
- Fill out the form (for example: set Environment to
iOS, add Versionv1.4.2, enter reproduction steps) and submit to ensure the resulting issue includes the provided data and labels.
Quick tips
- Use clear, concise labels to integrate with existing triage workflows (e.g.,
severity:high,needs-repro). - Keep required fields to the minimum necessary for triage (too many required fields can deter contributors).
- Consider adding a
severityorimpactdropdown if your team prioritizes by user impact.
Summary
Adding a structured issue template is a lightweight change that improves report quality and reduces back-and-forth during triage. Add the YAML file under.github/ISSUE_TEMPLATE/, verify the filename and path, and test by creating a new issue using the template.
Links and references
- GitHub: About issue and pull request templates
- GitHub: Configuring issue templates for your repository