Skip to content

Commit 5b74f27

Browse files
authored
Update message displayed by pre-commit hook (#31)
A user suggested I add a message about stashing and commiting synced changes separately
2 parents 2710b98 + d233664 commit 5b74f27

File tree

12 files changed

+22
-15
lines changed

12 files changed

+22
-15
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ on:
1010

1111
jobs:
1212
run-prek:
13-
uses: George-Ogden/actions/.github/workflows/lint.yaml@v4.0.2
13+
uses: George-Ogden/actions/.github/workflows/lint.yaml@v4.1.0

.github/workflows/readme-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ on:
1010

1111
jobs:
1212
check-readme:
13-
uses: George-Ogden/actions/.github/workflows/readme-check.yaml@v4.0.2
13+
uses: George-Ogden/actions/.github/workflows/readme-check.yaml@v4.1.0
1414
with:
1515
prefix: "rev: v"

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
tag-and-release:
14-
uses: George-Ogden/actions/.github/workflows/python-release.yaml@v4.0.2
14+
uses: George-Ogden/actions/.github/workflows/python-release.yaml@v4.1.0
1515
with:
1616
validation-code:
1717
validation-script: mirror sync

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
run-pytest:
13-
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v4.0.2
13+
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v4.1.0
1414
with:
1515
python-versions: "['3.13']"
1616
pytest-flags: -vv -m "not local"

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ out.txt
66
stderr.txt
77
err.txt
88
notes.txt
9+
refactor.list
910
profile*.svg
1011
TODO
1112
*.pseudo
@@ -22,6 +23,9 @@ nohup*
2223
# Built Visual Studio Code Extensions
2324
*.vsix
2425

26+
### PyCharm ###
27+
.idea/
28+
2529
### Python ###
2630
# Byte-compiled / optimized / DLL files
2731
__pycache__/

.mirror.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# DANGER: EDIT AT YOUR OWN RISK. Track this file in version control so that others can sync files correctly.
2-
- commit: 92e853634a273b8e222ca470242ec1f4aa4022d0
2+
- commit: 9545249862376ee2534db54ad7f2b7d923938aff
33
files:
44
- .github/python-release.yaml
55
- .github/python-test.yaml

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ci:
88

99
repos:
1010
- repo: https://github.com/George-Ogden/mirror-rorrim/
11-
rev: v0.4.6
11+
rev: v0.4.7
1212
hooks:
1313
- id: mirror-check
1414
fail_fast: true
@@ -24,7 +24,7 @@ repos:
2424
- id: requirements-txt-fixer
2525

2626
- repo: https://github.com/George-Ogden/linter/
27-
rev: v2.1.0
27+
rev: v2.1.1
2828
hooks:
2929
- id: lint
3030
args: [--fix]
@@ -36,7 +36,7 @@ repos:
3636
args: [--severity=warning]
3737

3838
- repo: https://github.com/astral-sh/ruff-pre-commit/
39-
rev: v0.15.4
39+
rev: v0.15.5
4040
hooks:
4141
- id: ruff-check
4242
args: [--fix]
@@ -55,12 +55,12 @@ repos:
5555
- id: actionlint
5656

5757
- repo: https://github.com/codespell-project/codespell/
58-
rev: v2.4.1
58+
rev: v2.4.2
5959
hooks:
6060
- id: codespell
6161

6262
- repo: https://github.com/George-Ogden/pre-commit-hooks/
63-
rev: v2.4.0
63+
rev: v3.0.0
6464
hooks:
6565
- id: check-merge-conflict
6666
exclude: test_data/.*/snapshots/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ If you use, `pre-commit`, consider adding this repo as a hook to check for updat
145145

146146
```yaml
147147
- repo: https://github.com/George-Ogden/mirror-rorrim/
148-
rev: v0.4.7
148+
rev: v0.4.8
149149
hooks:
150150
- id: mirror-check
151151
```

mirror/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ def check(pre_commit: bool) -> ExitCode:
121121
checker = MirrorChecker(target=GitDir.cwd())
122122
if (return_value := checker.check()) and pre_commit:
123123
logger.critical(
124-
f"{MIRROR_NAME} config files are not up to date; run `mirror sync` to update."
124+
f"{MIRROR_NAME} config files are not up to date; run `mirror sync` to update.\n"
125+
"(You may want to stash your changes and commit the sync separately.)"
125126
)
126127
return return_value
127128

mirror/main_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ def remove_git_data(local: GitDir) -> None:
136136
# behind with pre-commit
137137
"check --pre-commit",
138138
1,
139-
snapshot("Mirror|rorriM config files are not up to date; run `mirror sync` to update."),
139+
snapshot(
140+
"Mirror|rorriM config files are not up to date; run `mirror sync` to update. (You may want to stash your changes and commit the sync separately.)"
141+
),
140142
"checker_tests/behind",
141143
),
142144
# sync tests

0 commit comments

Comments
 (0)