mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Issue templates directory (#11450)
* Issue templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add some comments, appease the linter Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add docs and re-use dir candidates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add default labels to issue templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Generate swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> * Suggested changes Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update issue.go * Suggestions Signed-off-by: jolheiser <john.olheiser@gmail.com> * Extract metadata from legacy if possible Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		@@ -41,4 +41,39 @@ Possible file names for PR templates:
 | 
			
		||||
* .github/pull_request_template.md
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additionally, the New Issue page URL can be suffixed with `?body=Issue+Text` and the form will be populated with that string. This string will be used instead of the template if there is one.
 | 
			
		||||
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:
 | 
			
		||||
 | 
			
		||||
* ISSUE_TEMPLATE
 | 
			
		||||
* issue_template
 | 
			
		||||
* .gitea/ISSUE_TEMPLATE
 | 
			
		||||
* .gitea/issue_template
 | 
			
		||||
* .github/ISSUE_TEMPLATE
 | 
			
		||||
* .github/issue_template
 | 
			
		||||
* .gitlab/ISSUE_TEMPLATE
 | 
			
		||||
* .gitlab/issue_template
 | 
			
		||||
 | 
			
		||||
Inside the directory can be multiple issue templates with the form
 | 
			
		||||
 | 
			
		||||
```markdown
 | 
			
		||||
-----
 | 
			
		||||
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,
 | 
			
		||||
`bug` and `help needed`.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user