Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
GitHub Docs

Manually creating a single issue template for your repository

When you add a manually-created issue template to your repository, project contributors will automatically see the template's contents in the issue body.

Warning

This is the legacy workflow to create an issue template. We recommend using the upgraded multiple issue template builder or issue forms to create issue templates. For more information, seeAbout issue and pull request templates.

You can create anISSUE_TEMPLATE/ subdirectory in any of the supported folders to contain multiple issue templates, and use thetemplate query parameter to specify the template that will fill the issue body. For more information, seeCreating an issue.

You can add YAML frontmatter to each issue template to pre-fill the issue title, automatically add labels and assignees, and give the template a name and description that will be shown in the template chooser that people see when creating a new issue in your repository.

Here is example YAML front matter.

---name:Trackingissueabout:Usethistemplatefortrackingnewfeatures.title:"[DATE]: [FEATURE NAME]"labels:trackingissue,needstriageassignees:octocat---

Note

If a front matter value includes a YAML-reserved character such as: , you must put the whole value in quotes. For example,":bug: Bug" or":new: triage needed, :bug: bug".

To be displayed with a checkmark in the community profile checklist, issue templates must be located in the.github/ISSUE_TEMPLATE folder and contain validname: andabout: keys in the YAML frontmatter (for issue templates defined in.md files) or validname: anddescription: keys (for issue forms defined in.yml files).

You can create default issue templates and a default configuration file for issue templates for your organization or personal account. For more information, seeCreating a default community health file.

Adding an issue template

  1. On GitHub, navigate to the main page of the repository.

  2. Above the list of files, select theAdd file dropdown menu, then click Create new file.

    Alternatively, you can click in the file tree view on the left.

    Screenshot of the main page of a repository highlighting both the "Add file" and the "plus sign" icon, described above, with an orange outline.

  3. In the file name field:

    • To make your issue template visible in the repository's root directory, type the name of yourissue_template. For example,issue_template.md.
    • To make your issue template visible in the repository'sdocs directory, typedocs/ followed by the name of yourissue_template. For example,docs/issue_template.md,
    • To store your file in a hidden directory, type.github/ followed by the name of yourissue_template. For example,.github/issue_template.md.
    • To create multiple issue templates and use thetemplate query parameter to specify a template to fill the issue body, type.github/ISSUE_TEMPLATE/, then the name of your issue template. For example,.github/ISSUE_TEMPLATE/issue_template.md. You can also store multiple issue templates in anISSUE_TEMPLATE subdirectory within the root ordocs/ directories. For more information, seeCreating an issue.
  4. In the body of the new file, add your issue template. This could include:

    • YAML frontmatter
    • Expected behavior and actual behavior
    • Steps to reproduce the problem
    • Specifications like the version of the project, operating system, or hardware
  5. ClickCommit changes...

  6. In the "Commit message" field, type a short, meaningful commit message that describes the change you made to the file. You can attribute the commit to more than one author in the commit message. For more information, seeCreating a commit with multiple authors.

  7. Below the commit message fields, decide whether to add your commit to the current branch or to a new branch. If your current branch is the default branch, you should choose to create a new branch for your commit and then create a pull request. For more information, seeCreating a pull request.

    Screenshot of a GitHub pull request showing a radio button to commit directly to the main branch or to create a new branch. New branch is selected.
    Templates are available to collaborators when they are merged into the repository's default branch.

  8. ClickCommit changes orPropose changes.

Further reading


[8]ページ先頭

©2009-2025 Movatter.jp