E523 Expose remote branch ref as an environment variable by surafelabebe · Pull Request #1743 · pre-commit/pre-commit · GitHub
[go: up one dir, main page]

Skip to content

Expose remote branch ref as an environment variable#1743

Closed
surafelabebe wants to merge 5 commits intopre-commit:masterfrom
clumio-oss:remote_branch_ref
Closed

Expose remote branch ref as an environment variable#1743
surafelabebe wants to merge 5 commits intopre-commit:masterfrom
clumio-oss:remote_branch_ref

Conversation

@surafelabebe
Copy link
@surafelabebe surafelabebe commented Dec 21, 2020

The remote branch reference was exposed as an environment variable to be consumed by a pre-push hook, which makes git push decisions to remote branches with a certain name pattern.

Copy link
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.

hmmm I wonder if it's easy to extend the existing tests to cover this change

# Exposes remote branch ref as an environment variable
# for pre-push hooks consumption
if args.remote_branch:
environ['PRE_COMMIT_REMOTE_REF'] = args.remote_branch
Copy link
Member

Choose a reason for hiding this comment

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

this should be combined with the block below -- the naming here is inconsistent as well

Copy link
Author
@surafelabebe surafelabebe Jan 21, 2021

Choose a reason for hiding this comment

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

I updated the code as recommended. This time one of the tests is failing for some reason.

@surafelabebe surafelabebe changed the title Expose remote branch ref as an environment variable Expose remote branch ref as an environment variable Jan 22, 2021
Copy link
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
Copy link
Member

seems I can't merge this because you made the pull request from a company account (this also seems to be why pre-commit.ci couldn't autofix your pull request):

$ git push clumio-oss HEAD -f
ERROR: Permission to clumio-oss/pre-commit.git denied to asottile.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I'm going to close this and then reopen another pull request and maintain your authorship there

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

0