github: fix github event URLs and owners

This commit is contained in:
Chris Sexton 2020-11-09 03:31:41 -05:00 committed by Chris Sexton
parent 910b28666b
commit 05ba571f34
1 changed files with 7 additions and 7 deletions

View File

@ -73,7 +73,7 @@ func (p *GitPlugin) githubEvent(w http.ResponseWriter, r *http.Request) {
pr.PullRequest.User.Login, pr.PullRequest.User.Login,
pr.PullRequest.Title, pr.PullRequest.Title,
pr.Repository.Name, pr.Repository.Name,
pr.PullRequest.URL, pr.PullRequest.HTMLURL,
) )
case github.PingPayload: case github.PingPayload:
ping := payload.(github.PingPayload) ping := payload.(github.PingPayload)
@ -97,12 +97,12 @@ func (p *GitPlugin) githubEvent(w http.ResponseWriter, r *http.Request) {
return return
sendCommentEvent: sendCommentEvent:
repo = cmt.Repository.Name repo = cmt.Repository.Name
owner = cmt.Comment.User.Login owner = cmt.Repository.Owner.Login
msg += fmt.Sprintf("%s %s %s on <%s|%s #%d>", msg += fmt.Sprintf("%s %s %s on <%s|%s #%d>",
icon, icon,
owner, cmt.Issue.User.Login,
action, action,
cmt.Issue.URL, cmt.Issue.HTMLURL,
cmt.Issue.Title, cmt.Issue.Title,
cmt.Issue.Number, cmt.Issue.Number,
) )
@ -124,12 +124,12 @@ func (p *GitPlugin) githubEvent(w http.ResponseWriter, r *http.Request) {
return return
sendIssueEvent: sendIssueEvent:
repo = issueEvent.Repository.Name repo = issueEvent.Repository.Name
owner = issueEvent.Sender.Login owner = issueEvent.Repository.Owner.Login
msg += fmt.Sprintf("%s %s %s issue <%s|%s #%d>", msg += fmt.Sprintf("%s %s %s issue <%s|%s #%d>",
icon, icon,
owner, issueEvent.Issue.User.Login,
action, action,
issueEvent.Issue.URL, issueEvent.Issue.HTMLURL,
issueEvent.Issue.Title, issueEvent.Issue.Title,
issueEvent.Issue.Number, issueEvent.Issue.Number,
) )