Skip to content

Commit 4831899

Browse files
committed
update docs
1 parent 9474f83 commit 4831899

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.rst

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,18 @@ When the setup fails try updating ``pip``.
3333
Usage
3434
=====
3535

36+
jira_commit_msg hook
37+
--------------------
38+
3639
Add this to your project's ``.pre-commit-config.yaml`` file:
3740

3841
.. code-block:: yaml
3942
4043
repos:
4144
- repo: https://github.com/Cielquan/commit-msg-jira-hook
42-
rev: 0.6.2 # Use the ref you want to point at
45+
rev: 0.7.0 # Use the ref you want to point at
4346
hooks:
4447
- id: jira_commit_msg
45-
stages: [commit-msg]
4648
args: ["--jira-tag=<TAG>", "--verify", "--jira-url=<URL>"]
4749
4850
Exchange the placeholders with your actual config. <URL> may be ``https://jira.atlassian.com``.
@@ -68,6 +70,34 @@ Lastly install the hook:
6870
6971
$ pre-commit install -t commit-msg
7072
73+
jira_prepare_commit_msg hook
74+
----------------------------
75+
76+
Add this to your project's ``.pre-commit-config.yaml`` file:
77+
78+
.. code-block:: yaml
79+
80+
repos:
81+
- repo: https://github.com/Cielquan/commit-msg-jira-hook
82+
rev: 0.7.0 # Use the ref you want to point at
83+
hooks:
84+
- id: jira_prepare_commit_msg
85+
args: ["--jira-tag=<TAG>"]
86+
87+
Exchange the placeholders with your actual config.
88+
``--jira-tag`` is mandatory.
89+
``--auto`` can be omitted or changed to ``--always`` to always prepend JIRA tag to
90+
commit msg even when its already there.
91+
``--deactivate-with`` takes a string which, when present at the start of the commit msg,
92+
deactivates adding the JIRA tag to commit msg and removes the string from the commit msg.
93+
``--no-error`` silences the error which occurs when the current branch has no JIRA tag.
94+
95+
96+
Lastly install the hook:
97+
98+
.. code-block:: console
99+
100+
$ pre-commit install -t prepare-commit-msg
71101
72102
Disclaimer
73103
==========

0 commit comments

Comments
 (0)