How to set a default PR template for a GitHub organisation
I was wondering how a default PR template could be set for a GitHub organisation, but I found it a little difficult to find official documentation on the subject (though there is a support thread on the subject).
The secret is to:
- Create a repository within your organisation called
.github(a special repository where other default files like a license or code of conduct can be collected). - Create a
PULL_REQUEST_TEMPLATE.mdfile there, either in the root directory, or within a directory called.github. This file is a markdown document which can be edited in the same way as a pull request.
This template can be overridden in a specific repository by adding a PULL_REQUEST_TEMPLATE.md there.
Some examples: