Create a GitHub Issue Template

Joe Previte
InstructorJoe Previte
Share this video with your friends

Social Share Links

Send Tweet

Learn how to create a GitHub issue template inside of your repository. We make a template for feature requests by creating the file .github/ISSUE_TEMPLATE/feature_request.md inside of our repository. Then it's as simple as filling out the template with the form you want people to fill out.

This can save you time by adding basic requirements to bug reports and feature requests. If you prefer to learn by reading, you can read the accompanying blog post.

Link to example GitHub issue template.

Joe Previte: [00:00] At the root of your project, create a new directory called .github. Inside that directory, create another directory called ISSUE_TEMPLATE with an underscore in between and all in caps. Inside this new directory, create a file called feature_request.md. This is where we'll add our first issue template. I'm going to paste in something I created previously and save it.

[00:30] One thing I want to point out is the front matter up here. You'll notice a few different fields. The first is name which corresponds to the name of the option for the template. About is a description for the issue template. Labels is any labels that you want to automatically be added when this issue template is used.

[00:54] The next thing you want to do is make sure that you committed, so that these changes are on the default branch for the project. Now let's see our template in action.

[01:03] If we select a new issue, we'll see that we now have this option that we can choose from and we see that both the name and about fields show up here for the template. If we select get started, you'll notice that the label enhancement is already selected and you'll see the markdown body here.

[01:23] That's it. Now you can use issue templates to standardize your projects for bug reports, feature request and anything else you can imagine.