Commit 8df848c5 authored by zauberstuhl's avatar zauberstuhl

Fix nil pointer; use github client for listing commits

parent 2cfaa0db
......@@ -105,8 +105,8 @@ func webhook(w http.ResponseWriter, r *http.Request) {
if !flagExists {
// last but not least check the commit message for flags
var prService github.PullRequestsService
commits, _, err := prService.ListCommits(context.Background(),
client := github.NewClient(nil)
commits, _, err := client.PullRequests.ListCommits(context.Background(),
pr.GetHead().GetUser().GetLogin(),
pr.GetHead().GetRepo().GetName(),
pr.GetNumber(), &github.ListOptions{})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment