We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fe0dc24 + 9227b4d commit 49c0b0fCopy full SHA for 49c0b0f
cmd/commenter/commenter.go
@@ -110,7 +110,11 @@ More information available %s`,
110
}
111
112
func extractPullRequestNumber() (int, error) {
113
- github_event_file := "/github/workflow/event.json"
+ github_event_file := os.Getenv("GITHUB_EVENT_PATH")
114
+ if github_event_file == "" {
115
+ github_event_file = "/github/workflow/event.json"
116
+ }
117
+
118
file, err := ioutil.ReadFile(github_event_file)
119
if err != nil {
120
fail(fmt.Sprintf("GitHub event payload not found in %s", github_event_file))
0 commit comments