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: 4 comments 6 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.
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