Skip to content

Commit

Permalink
Remove pre-commit restriction for issue number
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljcollinsuk committed Oct 9, 2023
1 parent 1831606 commit 7f790a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
9 changes: 0 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,3 @@ repos:
- id: flake8
name: flake8 format check
entry: bash -c 'flake8 --config=.flake8 $(git diff --name-only --cached --diff-filter=ACMR | grep .py)'

- repo: local
hooks:
- id: issue-number
name: Check for Github issue number
language: pygrep
entry: '\A(?!GH+-[0-9]+)'
args: [--multiline]
stages: [commit-msg]
12 changes: 0 additions & 12 deletions doc/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,19 +444,7 @@ Current checks are:-
- `black` library (formats Python code)
- `isort` library (standardises the order of Python imports)
- `flake8` library (formats Python code and also improves code style)
- Github issue reference (commits must reference the issue number)

To override the above for whatever reason (maybe you don't have a ticket number and because you are working on hotfix) you can use the following command.

`PRE_COMMIT_ALLOW_NO_CONFIG=1 git push ...`

### Git commit message

Commit messages should follow the appropriate format.
All commits must begin with the Github issue they are associated with.

format: `GH-[int]`

e.g.

`git commit -m "GH-1234 insert message here"`

0 comments on commit 7f790a7

Please sign in to comment.