Adjust the branch reference fixer's logic
- change references to temporary branches (e.g., "release-*" and "publish") to point to the 'main' branch - add --branch=BRANCH_NAME option to the nox session so that one can pass in a target branch to make all references point to - run "fix-branch-references" as the first pre-commit hook as it fails the fastest - bug fix: allow dots in branch references (e.g., "release-0.1.0")
This commit is contained in:
parent
79f0ddf0fe
commit
db119ea776
2 changed files with 32 additions and 10 deletions
|
|
@ -4,6 +4,12 @@ repos:
|
|||
# Run the local formatting, linting, and testing tool chains.
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: local-fix-branch-references
|
||||
name: Check for wrong branch references
|
||||
entry: poetry run nox -s fix-branch-references --
|
||||
language: system
|
||||
stages: [commit]
|
||||
types: [text]
|
||||
- id: local-format
|
||||
name: Format the source files
|
||||
entry: poetry run nox -s format --
|
||||
|
|
@ -16,12 +22,6 @@ repos:
|
|||
language: system
|
||||
stages: [commit]
|
||||
types: [python]
|
||||
- id: local-fix-branch-references
|
||||
name: Adjust the branch references
|
||||
entry: poetry run nox -s fix-branch-references --
|
||||
language: system
|
||||
stages: [commit]
|
||||
types: [text]
|
||||
- id: local-test-suite
|
||||
name: Run the entire test suite
|
||||
entry: poetry run nox -s test-suite --
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue