Developer and Text Tools

Issue Forms, PR Templates and CODEOWNERS: Setting Up a Repository People Can Contribute To

Which community health files GitHub recognises, how issue forms beat blank issues, CODEOWNERS rules that trip people up, and how to generate the whole set.

Saizul Amin
Saizul Amin5 Nov 2026 · 3 min read
Issue Forms, PR Templates and CODEOWNERS: Setting Up a Repository People Can Contribute To

The difference between a repository that is pleasant to contribute to and one that is not often comes down to a few small files. A bug report that arrives with steps to reproduce and a version number can be fixed in an hour; one that says "it doesn't work" starts a week of back-and-forth. GitHub gives you the tools to ask for the right information up front. Most projects simply never set them up.

The files GitHub looks for

GitHub recognises a set of community health files. Issue templates live in .github/ISSUE_TEMPLATE, with a config.yml that controls the template chooser. The pull request template is .github/pull_request_template.md. CODEOWNERS sits in .github and names who must review changes to which paths. CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md and SUPPORT.md go at the root. GitHub links them from the new issue page, the pull request page and the repository's community profile.

Issue forms

Classic issue templates are Markdown that pre-fills the issue body, and people often delete the headings. Issue forms are YAML files that GitHub renders as a real form: text areas with placeholders, drop-downs, checkboxes and required fields. The answers are still turned into Markdown in the issue, so nothing changes for maintainers except that reports are complete.

A good bug form asks what happened and what was expected, steps to reproduce, the version (a drop-down of supported versions works well), the operating system, and logs rendered as code. A required checkbox confirming the reporter searched existing issues cuts duplicates. Set blank_issues_enabled to false in the config file to make people pick a template, and add contact links that send questions to Discussions and security reports to your private channel.

Pull request templates

The PR template is a Markdown checklist that pre-fills every new pull request. Keep it short: what changed, how it was tested, and three or four checkboxes such as tests updated, docs updated and issue linked. Long templates get ignored.

CODEOWNERS pitfalls

CODEOWNERS maps file patterns to people or teams, and GitHub requests their review automatically. Three rules catch people out. The last matching pattern wins, so a catch-all star placed at the bottom overrides everything above it. Owners must be @username, @org/team or an email linked to a GitHub account, and teams need write access. Some gitignore features, such as negation with an exclamation mark and character ranges in brackets, are not supported.

Contributing, conduct and security

CONTRIBUTING.md should let a newcomer go from clone to passing tests without asking: the install, test and lint commands, how to name branches, the commit message convention and what happens in review. A code of conduct sets expectations and names who to contact; many projects adopt the Contributor Covenant by reference. SECURITY.md says which versions get fixes and how to report a vulnerability privately, ideally through GitHub's private vulnerability reporting.

Generating the set

The GitHub Repository Templates Generator writes these files together from one form. Enter the project name, repository URL, contact and default branch. Choose issue forms or Markdown templates, which templates you want, labels, the version list and the PR checklist. Add CODEOWNERS rules in an editor that validates owners and patterns as you type. Fill in your real commands for CONTRIBUTING, pick a commit convention, DCO sign-off or a CLA note, and choose a code of conduct and security policy.

You can open each file to read it before downloading a ZIP with the right folders. Unzip it at the root of the repository, read the wording once more and commit.

Defaults for every repository

If you maintain many repositories, create a public repository named .github in your account or organisation and put the templates there. Repositories without their own versions inherit them. CODEOWNERS is the exception and must be added per repository.

Summary

Issue forms get complete bug reports, a short PR template gets tested changes, CODEOWNERS routes reviews if you mind the last-match rule, and CONTRIBUTING, conduct and security files answer the questions contributors would otherwise ask. Generate them once, adjust the wording, and every future issue starts better.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages