mirror of https://github.com/velour/catbase.git
git: actually do the thing
This commit is contained in:
parent
6ada638968
commit
d1149e7022
|
@ -46,7 +46,7 @@ func (p *GitPlugin) githubEvent(w http.ResponseWriter, r *http.Request) {
|
||||||
m,
|
m,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
msg = commits
|
msg += commits
|
||||||
case github.PullRequestPayload:
|
case github.PullRequestPayload:
|
||||||
pr := payload.(github.PullRequestPayload)
|
pr := payload.(github.PullRequestPayload)
|
||||||
if pr.Action != "opened" {
|
if pr.Action != "opened" {
|
||||||
|
@ -56,7 +56,7 @@ func (p *GitPlugin) githubEvent(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
repo = pr.Repository.Name
|
repo = pr.Repository.Name
|
||||||
owner = pr.Repository.Owner.Login
|
owner = pr.Repository.Owner.Login
|
||||||
msg = fmt.Sprintf("%s opened new pull request \"%s\" on %s: %s",
|
msg += fmt.Sprintf("%s opened new pull request \"%s\" on %s: %s",
|
||||||
pr.PullRequest.User.Login,
|
pr.PullRequest.User.Login,
|
||||||
pr.PullRequest.Title,
|
pr.PullRequest.Title,
|
||||||
pr.Repository.Name,
|
pr.Repository.Name,
|
||||||
|
@ -66,7 +66,7 @@ func (p *GitPlugin) githubEvent(w http.ResponseWriter, r *http.Request) {
|
||||||
ping := payload.(github.PingPayload)
|
ping := payload.(github.PingPayload)
|
||||||
repo = ping.Repository.Name
|
repo = ping.Repository.Name
|
||||||
owner = ping.Repository.Owner.Login
|
owner = ping.Repository.Owner.Login
|
||||||
msg = fmt.Sprintf(icon+"Got a ping request on %s", repo)
|
msg += fmt.Sprintf(icon+"Got a ping request on %s", repo)
|
||||||
default:
|
default:
|
||||||
log.Error().Interface("payload", payload).Msg("unknown event payload")
|
log.Error().Interface("payload", payload).Msg("unknown event payload")
|
||||||
w.WriteHeader(500)
|
w.WriteHeader(500)
|
||||||
|
|
|
@ -44,7 +44,7 @@ func (p *GitPlugin) gitlabEvent(w http.ResponseWriter, r *http.Request) {
|
||||||
m,
|
m,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
msg = commits
|
msg += commits
|
||||||
default:
|
default:
|
||||||
w.WriteHeader(500)
|
w.WriteHeader(500)
|
||||||
fmt.Fprintf(w, "unknown payload: %+v", payload)
|
fmt.Fprintf(w, "unknown payload: %+v", payload)
|
||||||
|
|
Loading…
Reference in New Issue