Clone all your repositories and apply sweeping changes.
iPad app for teaching students to be responsible digital citizens
Simple Python scripts for monitoring website uptime.
Java application for maintaining copies of a YouTube channel
Easily export a Banshee library to iTunes
Cargo subcommand for serving docs with an embedded webserver
Official bugsnag error monitoring and error reporting for django, flask, tornado and other python apps.
push eventpre-commit/pre-commit.com
commit sha d537f5d2545e85745053da7ecda0b2eb9425d4dc
Deployed to github pages
push time in 19 minutes
push eventpre-commit/pre-commit.com
commit sha 816facd1a01f7a5dabeb99af5013553c7704b13f
Add snakefmt for Snakemake files
commit sha 13620258d6f1021c87d59a336a0fac57179b7baf
Merge pull request #524 from berquist/add-snakefmt Add snakefmt for Snakemake files
push time in 20 minutes
PR merged pre-commit/pre-commit.com
I'm not a Snakemake or snakefmt author, but saw that they have a setup at https://github.com/snakemake/snakefmt/blob/master/.pre-commit-hooks.yaml and it wasn't in the list.
pr closed time in 20 minutes
PR opened pre-commit/pre-commit.com
I'm not a Snakemake or snakefmt author, but saw that they have a setup at https://github.com/snakemake/snakefmt/blob/master/.pre-commit-hooks.yaml and it wasn't in the list.
pr created time in 28 minutes
startedVitorVilela7/wide-snes
started time in 2 hours
startedapache/mynewt-nimble
started time in 2 hours
issue commentpre-commit/pre-commit-hooks
Add an “exclude folder” option to check-yaml hook.
I didn’t catch that, thanks @asottile!
comment created time in 3 hours
issue closedpre-commit/pre-commit-hooks
Add an “exclude folder” option to check-yaml hook.
(This may be useful for other checkers too?)
So, the problem is that Helm Chart templates have the filename extension .yaml although the files are Go templates<sup>*</sup> and not YAML files. Even the Helm documentation states:
TIP: Template names do not follow a rigid naming pattern. However, we recommend using the suffix
.yamlfor YAML files and.tplfor helpers.
which to me is a disagreeable statement.
And because these template files have the .yaml filename suffix, the check-yaml.py hook picks them up and then fails:
Check Yaml...............................................................Failed
- hook id: check-yaml
- exit code: 1
while parsing a flow node
did not find expected node content
in "deployment/helm/chart/templates/serviceaccount.yaml", line 1, column 3
while parsing a block mapping
...
Unfortunately, I don’t own these files and Helm Charts so renaming them is a bit of an ordeal (if at all doable).
If you’re open to a new command-line argument --exclude to exclude files/folders that match a given glob pattern, then I’m happy to provide a PR.
————— <sup>*</sup> Helm is written in Go (repo).
closed time in 3 hours
jenstroegerissue commentpre-commit/pre-commit-hooks
Add an “exclude folder” option to check-yaml hook.
there's no reason to do that because pre-commit provides exclude
comment created time in 3 hours
PR closed ocf/ocfstatic
Duplicate non-fork PR of issue #198 as explained in MR #205.
pr closed time in 3 hours
issue openedpre-commit/pre-commit-hooks
Add an “exclude folder” option to check-yaml hook.
(This may be useful for other checkers too?)
So, the problem is that Helm Chart templates have the filename extension .yaml although the files are Go templates<sup>*</sup> and not YAML files. Even the Helm documentation states:
TIP: Template names do not follow a rigid naming pattern. However, we recommend using the suffix
.yamlfor YAML files and.tplfor helpers.
which to me is a disagreeable statement.
And because these template files have the .yaml filename suffix, the check-yaml.py hook picks them up and then fails:
Check Yaml...............................................................Failed
- hook id: check-yaml
- exit code: 1
while parsing a flow node
did not find expected node content
in "deployment/helm/chart/templates/serviceaccount.yaml", line 1, column 3
while parsing a block mapping
...
Unfortunately, I don’t own these files and Helm Charts so renaming them is a bit of an ordeal (if at all doable).
If you’re open to a new command-line argument --exclude to exclude files/folders that match a given glob pattern, then I’m happy to provide a PR.
————— <sup>*</sup> Helm is written in Go (repo).
created time in 3 hours
PR closed ocf/ocfstatic
These changes are in response to issue #198 .

I saw some conversation of hard coding the data, but wanted to see if reading from an external json would work better.
I ended up creating such a json from scraped data from old website. Because scrapping is always wonky, lmk if there are any mistakes in names/handles.
Then I added a dropdown card with a table of the General & Site Managers for all terms.
I decided to format the json in a way where gms and sms are seperated into their own arrays for human sanity, but that meant a bit of work on run time to reorganize the arrays to work nice with tables. I'm not sure if this is better than just formatting the json to fit with the table format from the get-go, so please let me know.
Still haven't added Deputies or Commitee Heads, so that would be the next step. And then possibly only having handles in the json and then looking up names with ocf.lib functions like in the old website.
pr closed time in 3 hours
issue commentpre-commit/pre-commit-hooks
No hook to check for version bump?
@asottile That's quite a bit more negative a response than I was expecting for an offer to contribute. But I guess it does settle my main question of whether this already exists.
comment created time in 3 hours
startedmicrosoft/TypeScript
started time in 4 hours
startedibraheemdev/modern-unix
started time in 4 hours
startedibraheemdev/modern-unix
started time in 5 hours
issue commentpre-commit/pre-commit
Using mypy mirror, `pre-commit autoupdate` fails with `update target is missing these hooks`
@asottile 🤦♂️ thanks!
comment created time in 6 hours
issue closedpre-commit/pre-commit
Using mypy mirror, `pre-commit autoupdate` fails with `update target is missing these hooks`
I can't find any other references to this issue that I'm seeing.
My config:
repos:
- repo: https://github.com/psf/black
rev: 21.6b0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit
rev: v0.902
hooks:
- id: mypy
Attempting pre-commit autoupdate
$ pre-commit autoupdate
Updating https://github.com/psf/black ... already up to date.
Updating https://github.com/pre-commit/pre-commit ... Cannot update because the update target is missing these hooks:
mypy
Attempting a commit
$ git commit -m "feat: test pre commit hook"
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to <home-dir>/.cache/pre-commit/patch1624028680-83505.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit.
[INFO] Restored changes from <home-dir>/.cache/pre-commit/patch1624028680-83505.
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', 'checkout', 'v0.902')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: pathspec 'v0.902' did not match any file(s) known to git
Check the log at <home-dir>/.cache/pre-commit/pre-commit.log
If I use a sha instead of a tag, I get the same error on pre-commit autoupdate and a slightly different error on a commit attempt
$ git commit -m "feat: test pre commit hook"
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to <home-dir>/.cache/pre-commit/patch1624029168-83794.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit.
[INFO] Restored changes from <home-dir>/.cache/pre-commit/patch1624029168-83794.
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', 'checkout', '8254732e2eec9747094eff37f7e3450e67eff349')
return code: 128
expected return code: 0
stdout: (none)
stderr:
fatal: reference is not a tree: 8254732e2eec9747094eff37f7e3450e67eff349
Check the log at <home-dir>/.cache/pre-commit/pre-commit.log
Here's a dump of the pre-commit.log file (I cleared it & re-attempted the commit)
### version information
pre-commit version: 2.13.0
sys.version:
3.8.2 (default, Jun 8 2021, 13:48:06)
[Clang 12.0.5 (clang-1205.0.22.9)]
sys.executable: <my-path>/python/<my-repo>/.venv/bin/python
os.name: posix
sys.platform: darwin
### error information
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', 'checkout', 'v0.902')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: pathspec 'v0.902' did not match any file(s) known to git
Traceback (most recent call last):
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 183, in clone_strategy
self._shallow_clone(ref, _git_cmd)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 165, in _shallow_clone
git_cmd('-c', git_config, 'fetch', 'origin', ref, '--depth=1')
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 180, in _git_cmd
cmd_output_b('git', *args, cwd=directory, env=env)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/util.py", line 154, in cmd_output_b
raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', '-c', 'protocol.version=2', 'fetch', 'origin', 'v0.902', '--depth=1')
return code: 128
expected return code: 0
stdout: (none)
stderr:
fatal: couldn't find remote ref v0.902
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/error_handler.py", line 65, in error_handler
yield
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/main.py", line 357, in main
return hook_impl(
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/commands/hook_impl.py", line 227, in hook_impl
return retv | run(config, store, ns)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/commands/run.py", line 395, in run
for hook in all_hooks(config, store)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/repository.py", line 228, in all_hooks
return tuple(
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/repository.py", line 231, in <genexpr>
for hook in _repository_hooks(repo, store, root_config)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/repository.py", line 206, in _repository_hooks
return _cloned_repository_hooks(repo_config, store, root_config)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/repository.py", line 172, in _cloned_repository_hooks
manifest_path = os.path.join(store.clone(repo, rev), C.MANIFEST_FILE)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 187, in clone
return self._new_repo(repo, ref, deps, clone_strategy)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 144, in _new_repo
make_strategy(directory)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 185, in clone_strategy
self._complete_clone(ref, _git_cmd)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 158, in _complete_clone
git_cmd('checkout', ref)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 180, in _git_cmd
cmd_output_b('git', *args, cwd=directory, env=env)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/util.py", line 154, in cmd_output_b
raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', 'checkout', 'v0.902')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: pathspec 'v0.902' did not match any file(s) known to git
closed time in 8 hours
danseelyissue commentpre-commit/pre-commit
Using mypy mirror, `pre-commit autoupdate` fails with `update target is missing these hooks`
you've written this:
- repo: https://github.com/pre-commit/pre-commit
comment created time in 8 hours
issue openedpre-commit/pre-commit
Using mypy mirror, `pre-commit autoupdate` fails with `update target is missing these hooks`
I can't find any other references to this issue that I'm seeing.
My config:
repos:
- repo: https://github.com/psf/black
rev: 21.6b0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit
rev: v0.902
hooks:
- id: mypy
Attempting pre-commit autoupdate
$ pre-commit autoupdate
Updating https://github.com/psf/black ... already up to date.
Updating https://github.com/pre-commit/pre-commit ... Cannot update because the update target is missing these hooks:
mypy
Attempting a commit
$ git commit -m "feat: test pre commit hook"
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to <home-dir>/.cache/pre-commit/patch1624028680-83505.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit.
[INFO] Restored changes from <home-dir>/.cache/pre-commit/patch1624028680-83505.
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', 'checkout', 'v0.902')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: pathspec 'v0.902' did not match any file(s) known to git
Check the log at <home-dir>/.cache/pre-commit/pre-commit.log
If I use a sha instead of a tag, I get the same error on pre-commit autoupdate and a slightly different error on a commit attempt
$ git commit -m "feat: test pre commit hook"
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to <home-dir>/.cache/pre-commit/patch1624029168-83794.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit.
[INFO] Restored changes from <home-dir>/.cache/pre-commit/patch1624029168-83794.
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', 'checkout', '8254732e2eec9747094eff37f7e3450e67eff349')
return code: 128
expected return code: 0
stdout: (none)
stderr:
fatal: reference is not a tree: 8254732e2eec9747094eff37f7e3450e67eff349
Check the log at <home-dir>/.cache/pre-commit/pre-commit.log
Here's a dump of the pre-commit.log file (I cleared it & re-attempted the commit)
### version information
pre-commit version: 2.13.0
sys.version:
3.8.2 (default, Jun 8 2021, 13:48:06)
[Clang 12.0.5 (clang-1205.0.22.9)]
sys.executable: <my-path>/python/<my-repo>/.venv/bin/python
os.name: posix
sys.platform: darwin
### error information
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', 'checkout', 'v0.902')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: pathspec 'v0.902' did not match any file(s) known to git
Traceback (most recent call last):
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 183, in clone_strategy
self._shallow_clone(ref, _git_cmd)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 165, in _shallow_clone
git_cmd('-c', git_config, 'fetch', 'origin', ref, '--depth=1')
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 180, in _git_cmd
cmd_output_b('git', *args, cwd=directory, env=env)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/util.py", line 154, in cmd_output_b
raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', '-c', 'protocol.version=2', 'fetch', 'origin', 'v0.902', '--depth=1')
return code: 128
expected return code: 0
stdout: (none)
stderr:
fatal: couldn't find remote ref v0.902
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/error_handler.py", line 65, in error_handler
yield
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/main.py", line 357, in main
return hook_impl(
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/commands/hook_impl.py", line 227, in hook_impl
return retv | run(config, store, ns)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/commands/run.py", line 395, in run
for hook in all_hooks(config, store)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/repository.py", line 228, in all_hooks
return tuple(
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/repository.py", line 231, in <genexpr>
for hook in _repository_hooks(repo, store, root_config)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/repository.py", line 206, in _repository_hooks
return _cloned_repository_hooks(repo_config, store, root_config)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/repository.py", line 172, in _cloned_repository_hooks
manifest_path = os.path.join(store.clone(repo, rev), C.MANIFEST_FILE)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 187, in clone
return self._new_repo(repo, ref, deps, clone_strategy)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 144, in _new_repo
make_strategy(directory)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 185, in clone_strategy
self._complete_clone(ref, _git_cmd)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 158, in _complete_clone
git_cmd('checkout', ref)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/store.py", line 180, in _git_cmd
cmd_output_b('git', *args, cwd=directory, env=env)
File "<my-path>/python/<my-repo>/.venv/lib/python3.8/site-packages/pre_commit/util.py", line 154, in cmd_output_b
raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/usr/local/Cellar/git/2.32.0/libexec/git-core/git', 'checkout', 'v0.902')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: pathspec 'v0.902' did not match any file(s) known to git
created time in 8 hours
startedortuman/jackal
started time in 8 hours
PR opened ocf/keycloak
This pull request was automatically generated. Be sure to test it before merging! :) You can find a changelog at this link.
If you choose to reject this PR, please do not delete the associated branch until the software is updated OR the next version is released. That's how I keep track of the PRs I've already sent.
Origin note: This PR was generated by your friendly neighborhood penguin, ocfbot. You can get more information about this deployment at https://github.com/ocf/adelie.
pr created time in 9 hours
PR opened ocf/grafana
This pull request was automatically generated. Be sure to test it before merging! :) You can find a changelog at this link.
If you choose to reject this PR, please do not delete the associated branch until the software is updated OR the next version is released. That's how I keep track of the PRs I've already sent.
Origin note: This PR was generated by your friendly neighborhood penguin, ocfbot. You can get more information about this deployment at https://github.com/ocf/adelie.
pr created time in 9 hours
issue closedpre-commit/pre-commit-hooks
No hook to check for version bump?
Forgetting to bump the package version is an easy and common mistakes for many developers. For this reason I often use a hook that compares the current version to that on the main (or whichever) branch and warns me if they match. This does result in all my PRs starting with a version bump commit, but I consider that a beneficial side effect.
Is there such a thing, or anything similar, for pre-commit? Searching for version through this repo and https://pre-commit.com/hooks.html I couldn't find anything relevant. If it doesn't exist, I'm happy to contribute one :)
closed time in 9 hours
metovissue commentpre-commit/pre-commit-hooks
No hook to check for version bump?
you could write one, but I personally think such a hook is a bad idea. bumping versions in feature branches is a conflict-ridden workflow
comment created time in 9 hours