TRAVIS_TAG could set canpush without checking all rules#347
Open
peterjc wants to merge 1 commit intodrdoctr:masterfrom
Open
TRAVIS_TAG could set canpush without checking all rules#347peterjc wants to merge 1 commit intodrdoctr:masterfrom
peterjc wants to merge 1 commit intodrdoctr:masterfrom
Conversation
e.g. If the repository was a fork, then the push should be prevented - even if the build is for a tag and --build-tags is set.
Member
|
Looks like the doctr tests don't even pass on fork builds. I need to finish #343. |
Member
|
Oh actually I think that test failure is legitimate. It's a test for this function. So it should be updated. I think I never considered the fact that someone would push a tag to their fork, but this looks correct. |
asmeurer
reviewed
Jun 17, 2019
| print("The docs are not pushed on tag builds. To push on future tag builds, use --build-tags") | ||
| canpush = False | ||
|
|
||
| if not any([re.compile(x).match(TRAVIS_BRANCH) for x in branch_whitelist]): |
Member
There was a problem hiding this comment.
What is TRAVIS_BRANCH set to when TRAVIS_TAG is true?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If
$TRAVIS_TAGand--build-tagsare set, then we getcanpush=Truewithout checking all rules, e.g. If the repository was a fork, then the push should be prevented.As an aside, I noticed this edge can while looking at issue #342 (there are legitimate cases where it is reasonable to want to push from a forked repository).