Issue and Pull Request Templates
Table of Contents
Some projects have a standard list of questions that users need to answer when creating an issue or pull request. Gitea supports adding templates to the main branch of the repository so that they can autopopulate the form when users are creating issues and pull requests. This will cut down on the initial back and forth of getting some clarifying details.
Possible file names for issue templates:
Possible file names for PR templates:
Additionally, the New Issue page URL can be suffixed with
?title=Issue+Title&body=Issue+Text and the form will be populated with those strings. Those strings will be used instead of the template if there is one.
Issue Template Directory
Alternatively, users can create multiple issue templates inside a special directory and allow users to choose one that more specifically addresses their problem.
Possible directory names for issue templates:
Inside the directory can be multiple issue templates with the form
--- name: "Template Name" about: "This template is for testing!" title: "[TEST] " labels: - bug - "help needed" --- This is the template!
In the above example, when a user is presented with the list of issues they can submit, this would show as
Template Name with the description
This template is for testing!. When submitting an issue with the above example, the issue title would be pre-populated with
[TEST] while the issue body would be pre-populated with
This is the template!. The issue would also be assigned two labels,