Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Support a special `rev: PLACEHOLDER` which upon first installation will autoupdate #1023
Comments
|
I wish to work on this feature. |
|
hmm yes, I'm not entirely sure where this should get implemented -- the autoupdate code lives in The configuration loading ~mostly happens in autoupdate would also need to learn how to update from |
|
I've been poking around at implementing this and I have a couple questions about your intent with this issue.
|
|
yeah I think this would update the config on first run, without using |
problem
It's often clunky for hook authors to document a copy-pasteable snippet for use with pre-commit as they need to include a version number to use (this can be annoying when releasing that you need to remember to bump that version too!).
The current suggestion has been to use
rev: ''though that leads to mysterious git errors -- for quite some time this was trending in our github trafficproposal
Provide some sort of placeholder value, for backwards compatibility with existing documentation also allow the empty string as that placeholder value. This would allow a copy-pasteable snippet.
pre-commit would then need to ~essentially
pre-commit autoupdate --repo $repowhen encounteredthoughts?