-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git: accept explicit commit hash for git context #1765
Merged
Merged
Conversation
This file contains 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
tejal29
approved these changes
Oct 19, 2021
wwade
force-pushed
the
master
branch
2 times, most recently
from
October 19, 2021 21:27
5314064
to
1061be9
Compare
I'm just going to fix the "Unit tests" failure also affecting "build-executor". |
When checking out code from non-github repositories, the typical assumptions may not be valid, e.g. that the only interesting non-branch commits have ref names starting with refs/pull. A specific example is fetching an un-merged commit from a gerrit repository by commit hash. This change just looks at the second part of the git context path and checks if it's a SHA commit hash, and if so, will fetch and check out this commit after cloning the repository. Sample context argument: https://github.repo/project#e1772f228e06d15facdf175e5385e265b57068c0
hack/linter.sh didn't properly install golangci-lint in hack/bin as I already have another version of golangci-lint on my PATH, but then it failed to execute because it was looking for it specifically in hack/bin. When the executable is not found, the exit code is 127 instead of 1, and so test.sh ignored the error. Two fixes: 1. `test.sh`: - Use `if (script) ...` instead of assigning / checking a result variable to determine if each validation script passed or failed. 2. `hack/linter.sh`: - Instead of checking for golangci-lint on the path, just specifically check for an executable file (`test -x`) in the expected location.
|
tejal29
approved these changes
Oct 20, 2021
4 tasks
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.
When checking out code from non-github repositories, the typical
assumptions may not be valid, e.g. that the only interesting
non-branch commits have ref names starting with refs/pull. A specific
example is fetching an un-merged commit from a gerrit repository by
commit hash.
This change just looks at the second part of the git context path and
checks if it's a SHA commit hash, and if so, will fetch and check out
this commit after cloning the repository.
Sample context argument:
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Reviewer Notes
Release Notes