-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Added test case for commit ref with percent encoding #1118
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
Conversation
ac58aaa
to
42a5340
Compare
Thanks, @vaibhavsingh97. First, please don't use force-push for commits on PRs for this repo, as we "Squash and merge" them anyway. Second, you may be aware of this already, but the Travis CI build is currently failing with the most recent commit, with this error:
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the Googlers can find more info about SignCLA and this PR by following this link. |
@gmlewis Sorry for late update. I had updated my PR, please review
Thanks, I will keep in mind in near future |
Hmmm... I'm not sure why GitHub is showing us such a mess in the diffs. |
@gmlewis I had fixed this but it's needed a force push, please let me know if I needed to do the same |
OK that's odd. If you can fix this with force pushes, then please go ahead despite what I said earlier. 😄 |
f06dd7d
to
dd99151
Compare
CLAs look good, thanks! Googlers can find more info about SignCLA and this PR by following this link. |
@gmlewis Please review 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @vaibhavsingh97 and sorry for the delay.
LGTM apart from a tiny nit, if you don't mind addressing.
Awaiting second LGTM before merging.
github/repos_commits_test.go
Outdated
} | ||
|
||
want := sha1 | ||
if got != want { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Go style is typically:
if want := sha1; got != want {
although I know we don't always follow that style in this repo. I'd prefer it, though, if you don't mind and there aren't any objections.
github/repos_commits_test.go
Outdated
} | ||
|
||
want = "" | ||
if got != want { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: if want := ""; got != want {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmlewis I added suggested changes, but it gave me error
github/repos_commits_test.go:260:5: undefined: want
github/repos_commits_test.go:261:61: undefined: want
should I revert it?
github/repos_commits_test.go
Outdated
t.Errorf("Expected HTTP 304 response") | ||
} | ||
|
||
if want = ""; got != want { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're just missing a :
here:
if want := ""; got != want {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, missed it. Thanks, I had updated my PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, +1.
Good work @vaibhavsingh97! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @vaibhavsingh97 and @kshitij10496 for the review.
Merging.
Fixes #1101
Added test case for
Repositories.GetCommitSHA1
, when it was called with the branch name which includes the non-alphabet character.