From 65d185f15305a02b18f1a1cbcdb025e960d26492 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 12 May 2020 10:23:43 -0700 Subject: [PATCH] chore: add support for prlint: a commit msg linter (#9655) Sets up [PRLint](https://github.com/apps/prlint), with a single rule matching [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) Also modifying the PR template to remove redundant annoying checkbox section. Once we adopt, I'm hoping we can modify our bot to auto-label based on the commit type. --- .github/PULL_REQUEST_TEMPLATE.md | 13 ------------- .github/prlint.json | 8 ++++++++ 2 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 .github/prlint.json diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d0984a7aa..4d6b88e89 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,14 +1,3 @@ -### CATEGORY - -Choose one - -- [ ] Bug Fix -- [ ] Enhancement (new features, refinement) -- [ ] Refactor -- [ ] Add tests -- [ ] Build / Development Environment -- [ ] Documentation - ### SUMMARY @@ -27,5 +16,3 @@ Choose one - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [ ] Removes existing feature or API - -### REVIEWERS diff --git a/.github/prlint.json b/.github/prlint.json new file mode 100644 index 000000000..0b17c3894 --- /dev/null +++ b/.github/prlint.json @@ -0,0 +1,8 @@ +{ + "title": [ + { + "pattern": "^(build|ci|docs|feat|fix|perf|refactor|style|test|other)((.+))?:\\s.+", + "message": "Your title needs to be prefixed with a topic." + } + ] +}