Repository navigation
scripts: let pr-wait.sh --sha take an abbreviated commit id - #219
Merged
Merged
Conversation
--sha compared its value with the PR's full head id, so an abbreviated id such as git log --oneline prints never matched: pr-wait reported 'waiting for head a0e6b74; the PR is at a0e6b74...' every poll and gave up after the whole 30-minute deadline, long after the checks had finished. An id of 7 or more hex digits now matches as a prefix; a shorter one is a usage error. Signed-off-by: Yi-Ru Lin <deduce@gmail.com>
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.
pr-wait.sh --shacompared its value with the PR's full head id. An abbreviated id, such asgit log --onelineprints, therefore never matched. pr-wait loggedwaiting for head a0e6b74; the PR is at a0e6b74fc62…on every poll, and gave up only when the 30-minute deadline ran out, long after the checks had finished. An agent hit this four times in one session.An id of 7 or more hex digits now matches as a prefix of the head. A shorter one is a usage error, because it could match a commit nobody meant. The test fixtures use full 40-digit ids, and there is a test for the abbreviated case.