-
-
Notifications
You must be signed in to change notification settings - Fork 457
Description
reviewdog checks for GITHUB_ACTION
context variable in order to determine it's running in GitHub Actions or not.
reviewdog/cienv/github_actions.go
Lines 99 to 103 in 31a1260
// IsInGitHubAction returns true if reviewdog is running in GitHub Actions. | |
func IsInGitHubAction() bool { | |
// https://help.github.com/en/articles/virtual-environments-for-github-actions#default-environment-variables | |
return os.Getenv("GITHUB_ACTION") != "" | |
} |
However GITHUB_ACTION
context variable has become empty in recent updates, so currently this check always fails.
ref. actions/runner#635
As a result, running reviewdog in GitHub Actions always fails with this error: reviewdog: cannot get repo owner from environment variable. Set CI_REPO_OWNER?
.
Lines 53 to 55 in c9d205f
if owner == "" { | |
return nil, false, errors.New("cannot get repo owner from environment variable. Set CI_REPO_OWNER?") | |
} |
I think this is a regression of GitHub Actions' runner, but I also think it's reasonable to mitigate this problem by checking another context variables such as GITHUB_ACTIONS
like codecov/codecov-bash does: