Why can't I add more than one PR template to a repo to then be selected say from a dropdown. My workplace utilizes a monorepo that has different tasking categories that require different pull request markdown templates and I want that. #180005
Replies: 7 comments 7 replies
-
|
GitHub does support multiple pull-request templates, but they must be placed inside a .github/PULL_REQUEST_TEMPLATE/ directory. Any Markdown files inside that folder will appear in a dropdown selector when creating a new pull request. The reason you only saw PULL_REQUEST_TEMPLATE.md work is that a single template file at the root of .github/ or under .github/PULL_REQUEST_TEMPLATE.md becomes the default template, while multiple selectable templates must be stored as separate files inside the dedicated folder. The correct structure is: .github/ Once this structure is in place, GitHub will automatically show the dropdown so contributors can choose the appropriate PR template. Although, GitHub only loads a single default PULL_REQUEST_TEMPLATE.md when it’s placed directly in the .github directory, which is why only that file worked for you. If you want multiple selectable PR templates, they must be placed inside a folder named .github/PULL_REQUEST_TEMPLATE/. Each Markdown file inside that folder becomes its own option in the pull-request template dropdown. For example: .github/PULL_REQUEST_TEMPLATE/bug_fix.md, feature_request.md, and docs_update.md. Once you use this structure, GitHub will automatically display all templates for selection when opening a new pull request. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Look, GitHub only loads a single default PR template from You can follow this approach:
Once you do that, GitHub will show a dropdown when you open a new PR, and you can choose the template you need. The key point is that the directory must be named exactly |
Beta Was this translation helpful? Give feedback.
-
|
Why GitHub doesn’t support multiple selectable PR templates
GitHub PR templates are: Plain Markdown files Automatically injected into the PR description Not interactive (no UI, no logic, no dropdowns) GitHub’s design goal was: “Provide a default starting point, not a configurable workflow.” Because of this: No dropdown No chooser UI No conditionals No enforcement logic |
Beta Was this translation helpful? Give feedback.
-
|
But what is the point of what @Alhadkabir mentions, if it's impossible to visualize a dropdown menu? The "selector" should work in any repo? or could be a problem inside organization repos? |
Beta Was this translation helpful? Give feedback.
-
|
Hi. How are you? I'm experiencing the same problem. As a temporary solution, I'm using @kuzma-rezchenko-EPAM's suggestion. But I think this problem is happening because the template is probably not in the main branch. I think if it's in In my case here, the default branch configured is |
Beta Was this translation helpful? Give feedback.
-
|
Why Only One "Auto-Fill" PR Template? GitHub's PR template system was designed with simplicity in mind — one .github/pull_request_template.md that auto-populates the description box. A dropdown selector was never built into the UI. But You Can Have Multiple Templates .github/ Then link to them via URL with a query param: The "Dropdown" Workaround for Monorepos A pinned wiki page / README with direct links per template — click the one you need before opening the PR Why GitHub Hasn't Added a Native Dropdown It's a long-standing feature request (years old). GitHub's stance has essentially been that the URL query approach covers the use case — but the community disagrees, especially for monorepo teams like yours. You can upvote it on the GitHub Community forum. TL;DR — GitHub supports multiple template files but you have to link to them manually. No native UI picker exists yet. The URL ?template= param is your best built-in option. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Title. Is there a way to accomplish this that I'm missing? I tried a directory for PR templates with multiple in it but I could only get the PULL_REQUEST_TEMPLATE.md to work in the .github directory.
Beta Was this translation helpful? Give feedback.
All reactions