-
Notifications
You must be signed in to change notification settings - Fork 5k
PR Webhook - Add base/head info #3547
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
HeadBranch: pr.HeadBranch, | ||
HeadRepo: pr.HeadRepo.APIFormat(nil), | ||
BaseBranch: pr.BaseBranch, | ||
BaseRepo: pr.BaseRepo.APIFormat(nil), |
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.
State: apiIssue.State, | ||
Comments: apiIssue.Comments, | ||
HeadBranch: pr.HeadBranch, | ||
HeadRepo: pr.HeadRepo.APIFormat(nil), |
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.
Have you check all the places that calls PullRequest.APIFormat
ensure HeadRepo
and BaseRepo
are not nil?
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.
Will double check - OR would it be better to do a nil check here and return nil?
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.
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.
Added nil checks and comments
Any update on this PR? |
It would be fantastic to have this data. I'm trying to add Gogs support to codebeat and we're missing crucial pieces of info in the webhook payload:
GitHub, Bitbucket and Gitlab all provide these fields on one form or another so they're pretty much an industry standard and enable cool integrations. |
@kmadel Would it be possible for you to open this PR also on https://github.com/go-gitea/gitea ? |
@hhenkel sure, np |
Thanks! |
Regarding #3484
Requires gogs/go-gogs-client#47