mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
moved the remote branch env variable to the block below it.
This commit is contained in:
parent
d62ac20518
commit
aab18e46c6
2 changed files with 3 additions and 11 deletions
|
|
@ -52,8 +52,4 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-hooks-apply
|
- id: check-hooks-apply
|
||||||
- id: check-useless-excludes
|
- id: check-useless-excludes
|
||||||
- repo: https://github.com/clumio-code/pre-push-hooks
|
|
||||||
rev: v0.1.0
|
|
||||||
hooks:
|
|
||||||
- id: check-branch-for-push
|
|
||||||
args: ['--pattern', '^user/.*', '--pattern', '^team/.*', '--pattern', '^revert-[0-9]+-user/.*']
|
|
||||||
|
|
|
||||||
|
|
@ -371,12 +371,8 @@ def run(
|
||||||
environ['PRE_COMMIT_FROM_REF'] = args.from_ref
|
environ['PRE_COMMIT_FROM_REF'] = args.from_ref
|
||||||
environ['PRE_COMMIT_TO_REF'] = args.to_ref
|
environ['PRE_COMMIT_TO_REF'] = args.to_ref
|
||||||
|
|
||||||
# Exposes remote branch ref as an environment variable
|
if args.remote_name and args.remote_url and args.remote_branch:
|
||||||
# for pre-push hooks consumption
|
environ['PRE_COMMIT_REMOTE_BRANCH'] = args.remote_branch
|
||||||
if args.remote_branch:
|
|
||||||
environ['PRE_COMMIT_REMOTE_REF'] = args.remote_branch
|
|
||||||
|
|
||||||
if args.remote_name and args.remote_url:
|
|
||||||
environ['PRE_COMMIT_REMOTE_NAME'] = args.remote_name
|
environ['PRE_COMMIT_REMOTE_NAME'] = args.remote_name
|
||||||
environ['PRE_COMMIT_REMOTE_URL'] = args.remote_url
|
environ['PRE_COMMIT_REMOTE_URL'] = args.remote_url
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue