Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
Use After instead of HeadCommit in push handler
Browse files Browse the repository at this point in the history
Apparently HeadCommit isn't always set. This fixes #4
  • Loading branch information
discordianfish committed Oct 7, 2019
1 parent 4a752a8 commit 8b57a9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion push.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (h *PushHandler) Handle(ctx context.Context, event *github.PushEvent) (*han
*event.Repo.Name,
h.ResourcePath,
&github.RepositoryContentGetOptions{
Ref: *event.HeadCommit.ID,
Ref: *event.After,
})
if err != nil {
return nil, fmt.Errorf("Couldn't get file %s from %s/%s at %s: %s", h.ResourcePath, *event.Repo.Owner.Login, *event.Repo.Name, *event.HeadCommit.ID, err)
Expand Down

0 comments on commit 8b57a9d

Please sign in to comment.