Skip to content

Commit 9c5e1e0

Browse files
authored
fix(cli): fixes pr event misfiring (#179)
1 parent d7c5af0 commit 9c5e1e0

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/providers/github/env.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,7 @@ func (g *DefaultGithubEnv) GetPRNumber() int {
118118

119119
// IsPR returns whether the current environment is associated with a pull request.
120120
func (g *DefaultGithubEnv) IsPR() bool {
121-
if _, ok := os.LookupEnv("GITHUB_HEAD_REF"); ok {
122-
return true
123-
}
124-
125-
if g.GetEventType() == "pull_request" {
126-
return true
127-
}
128-
129-
return false
121+
return g.GetEventType() == "pull_request"
130122
}
131123

132124
// HasEvent returns whether a GitHub event payload exists.

0 commit comments

Comments
 (0)