Link to Specific Issue Template - UP-Manila-SILab/ph-core GitHub Wiki
To create a link in GitHub that opens a specific issue template, you can use a URL with query parameters that pre-fill the issue form and specify the template to use. Here's how you can do it:
✅ Prerequisites
Make sure:
- You have a
.github/ISSUE_TEMPLATE/
folder in your repository. - Your issue templates are in YAML format (e.g.,
bug_report.yml
,feature_request.yml
). - Each template has a
name
and atitle
defined in its front matter.
🔗 URL Format to Open a Specific Template
https://github.com/OWNER/REPO/issues/new?template=TEMPLATE_NAME.yml
- Replace
OWNER
with your GitHub username or organization. - Replace
REPO
with your repository name. - Replace
TEMPLATE_NAME.yml
with the exact filename of your issue template.
🧠 Example
If you have a template file at .github/ISSUE_TEMPLATE/bug_report.yml
, the link would be:
https://github.com/octocat/hello-world/issues/new?template=bug_report.yml
📝 Optional: Pre-fill Title and Body
You can also pre-fill the issue title and body using query parameters:
https://github.com/octocat/hello-world/issues/new?template=bug_report.yml&title=Bug+in+login+flow&body=Steps+to+reproduce%3A%0A1.+Go+to+login+page%0A2.+Enter+credentials%0A3.+Click+login
Let me know if you want help generating a link for your specific repo and template!