From 578e14adf18b4437d0eee7f460276fc6916d2deb Mon Sep 17 00:00:00 2001 From: roman-kiselenko Date: Thu, 16 Nov 2023 18:19:24 +0300 Subject: [PATCH] add note to pr template and DEVELOPMENT.md --- .github/pull_request_template.md | 1 + DEVELOPMENT.md | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 492cc8e6496..708febf947e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,6 +10,7 @@ As the author of this PR, please check off the items in this checklist: - [ ] Has [Docs](https://github.com/tektoncd/community/blob/main/standards.md#docs) if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps - [ ] Has [Tests](https://github.com/tektoncd/community/blob/main/standards.md#tests) included if any functionality added or changed +- [ ] [pre-commit](https://github.com/tektoncd/pipeline/blob/main/DEVELOPMENT.md#install-tools) Passed - [ ] Follows the [commit message standard](https://github.com/tektoncd/community/blob/main/standards.md#commits) - [ ] Meets the [Tekton contributor standards](https://github.com/tektoncd/community/blob/main/standards.md) (including functionality, content, code) - [ ] Has a kind label. You can add one by adding a comment on this PR that contains `/kind `. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 1cf7c923ced..f3992d3e21f 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -56,7 +56,14 @@ You must install these tools: 1. [`git`](https://help.github.com/articles/set-up-git/): For source control -1. [`pre-commit`](https://pre-commit.com/#install): Git hook scripts +1. [`pre-commit`](https://pre-commit.com/#install): pre-commit generates and runs locally a few checks (as [git-hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)) to ensure the pushed code is valid. All checks are performed prior to `git push` command. + + ```shell + # After install step run pre-commit binary at the root directory in order to install git hooks. + pre-commit install + # Run the hooks against all of the files + pre-commit run --all-files + ``` 1. [`go`](https://golang.org/doc/install): The language Tekton Pipelines is built in.