mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Expose remote branch ref as an environment variable
This commit is contained in:
parent
bb50e00447
commit
cb5ed6276d
5 changed files with 14 additions and 2 deletions
|
|
@ -371,7 +371,8 @@ def run(
|
|||
environ['PRE_COMMIT_FROM_REF'] = args.from_ref
|
||||
environ['PRE_COMMIT_TO_REF'] = args.to_ref
|
||||
|
||||
if args.remote_name and args.remote_url:
|
||||
if args.remote_name and args.remote_url and args.remote_branch:
|
||||
environ['PRE_COMMIT_REMOTE_BRANCH'] = args.remote_branch
|
||||
environ['PRE_COMMIT_REMOTE_NAME'] = args.remote_name
|
||||
environ['PRE_COMMIT_REMOTE_URL'] = args.remote_url
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue