-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
webhooks: Add head_commit
field to push payload.
#5419
Conversation
965bd43
to
9da719c
Compare
9da719c
to
839f1de
Compare
(Updated dependency, build should pass now!) |
Would be great if convert.ToCommit could be reused somehow to get api.PayloadCommit to not have so much duplicated code. |
@HarshitOnGitHub can you fix to reuse |
@lafriks |
@lafriks Thoughts? |
Codecov Report
@@ Coverage Diff @@
## master #5419 +/- ##
=========================================
Coverage ? 37.76%
=========================================
Files ? 327
Lines ? 47874
Branches ? 0
=========================================
Hits ? 18080
Misses ? 27195
Partials ? 2599
Continue to review full report at Codecov.
|
Any help/suggestions would be appreciated! :) |
@@ -720,6 +781,7 @@ func CommitRepoAction(opts CommitRepoActionOptions) error { | |||
After: opts.NewCommitID, | |||
CompareURL: setting.AppURL + opts.Commits.CompareURL, | |||
Commits: opts.Commits.ToAPIPayloadCommits(repo.HTMLURL()), | |||
HeadCommit: getHeadCommit(repo, opts.NewCommitID), |
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.
Could we get the head PayloadCommit from APIPayLoadCommits ?
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.
Would it be safe to assume that head commit is present at a specific location in the list(like at the starting or end) or are you suggesting to iterate over the list?
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
Please resolve the conflicts |
Would appreciate comments/feedback on whether the approach taken is correct or not. Have tested the changes manually.
Fixes: #5266.