From 61abd8fbf8be6d15ecefe1c478c6be812a3661fa Mon Sep 17 00:00:00 2001 From: Laurent Sorber Date: Wed, 1 Jan 2020 17:13:46 +0100 Subject: [PATCH] Limit hook to the prepare-commit-msg stage --- .pre-commit-hooks.yaml | 1 + README.md | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 7b1bf27..ae3927a 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -3,4 +3,5 @@ description: Automatically transform your Git commit messages into Jira smart commits entry: auto-smart-commit.py language: script + stages: [prepare-commit-msg] always_run: true diff --git a/README.md b/README.md index 6b59a94..7e38bdb 100644 --- a/README.md +++ b/README.md @@ -23,22 +23,12 @@ See [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/ ## Installation -### Installation with pre-commit - Add the following to your `.pre-commit-config.yaml` file: ```yaml repos: - repo: https://github.com/radix-ai/auto-smart-commit - rev: v1.0.0 + rev: v1.0.1 hooks: - id: auto-smart-commit ``` - -### Manual installation - -Copy `auto-smart-commit.py` to a `githooks` directory in your repository, then run the following command from the root of your repository: - -```bash -git config --local core.hooksPath githooks -```