Skip to content

Document PRE_COMMIT environment variable#1071

Merged
asottile merged 1 commit intopre-commit:mainfrom
matthewhughes934:document-pre-commit-running
Apr 5, 2026
Merged

Document PRE_COMMIT environment variable#1071
asottile merged 1 commit intopre-commit:mainfrom
matthewhughes934:document-pre-commit-running

Conversation

@matthewhughes934
Copy link
Copy Markdown
Contributor

@matthewhughes934 matthewhughes934 commented Mar 26, 2026

Document this variable, exposed since v2.5.0[1], as a way to determine if pre-commit is running. Because It took a bit of searching in the pre-commit repo to discover the existence of this variable.

Link: pre-commit/pre-commit@2f25085 [1]

@matthewhughes934
Copy link
Copy Markdown
Contributor Author

I figured opening a PR was approximately the same effort as asking if this should be documented 🙂

@matthewhughes934 matthewhughes934 force-pushed the document-pre-commit-running branch from e149b9a to c207eb4 Compare March 26, 2026 20:53
@asottile
Copy link
Copy Markdown
Member

asottile commented Apr 1, 2026

I think this information probably makes more sense in the "creating new hooks" section as just a little note rather than a completely new section here?

@matthewhughes934 matthewhughes934 force-pushed the document-pre-commit-running branch from c207eb4 to dd16416 Compare April 2, 2026 06:30
@matthewhughes934
Copy link
Copy Markdown
Contributor Author

I think this information probably makes more sense in the "creating new hooks" section as just a little note rather than a completely new section here?

👍 agreed, moved it there with the latest commit

@matthewhughes934 matthewhughes934 force-pushed the document-pre-commit-running branch from dd16416 to ed0a26d Compare April 5, 2026 18:39
@asottile asottile force-pushed the document-pre-commit-running branch from ed0a26d to ef83ef1 Compare April 5, 2026 18:55
Document this variable, exposed since `v2.5.0`[1], as a way to determine
if `pre-commit` is running. Because It took a bit of searching in the
`pre-commit` repo to discover the existence of this variable.

Link: pre-commit/pre-commit@2f25085 [1]
Copy link
Copy Markdown
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asottile asottile merged commit c24be56 into pre-commit:main Apr 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants