From a69f7c84c0ae24bfe8a57b38b85e808e98b9603c Mon Sep 17 00:00:00 2001 From: Zhou Feiyu Date: Fri, 10 Jan 2020 20:47:29 +0800 Subject: [PATCH] FIX: issues 150, bad commit ref for github action --- goveralls.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/goveralls.go b/goveralls.go index 7716171..19a5047 100644 --- a/goveralls.go +++ b/goveralls.go @@ -322,9 +322,11 @@ func process() error { commitRef := "HEAD" if os.Getenv("GITHUB_EVENT_NAME") == "pull_request" { - ghPR := getGithubEvent()["pull_request"].(map[string]interface{}) - ghHead := ghPR["head"].(map[string]interface{}) - commitRef = ghHead["sha"].(string) + // ghPR := getGithubEvent()["pull_request"].(map[string]interface{}) + // ghHead := ghPR["head"].(map[string]interface{}) + // commitRef = ghHead["sha"].(string) + log.Printf("github event value: %+v", getGithubEvent()) + commitRef = fmt.Sprintf("refs/pull/%s/merge", pullRequest) } j := Job{