8000 github-check: disable filtering for pull-request by haya14busa · Pull Request #364 · reviewdog/reviewdog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

github-check: disable filtering for pull-request #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cmd/reviewdog/doghouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ import (
"github.com/reviewdog/reviewdog/project"
)

func runDoghouse(ctx context.Context, r io.Reader, w io.Writer, opt *option, isProject bool, allowNonPR bool) error {
func runDoghouse(ctx context.Context, r io.Reader, w io.Writer, opt *option, isProject bool, forPr bool) error {
ghInfo, isPr, err := cienv.GetBuildInfo()
if err != nil {
return err
}
if !isPr && !allowNonPR {
if !isPr && forPr {
fmt.Fprintln(os.Stderr, "reviewdog: this is not PullRequest build.")
return nil
}
if !forPr {
ghInfo.PullRequest = 0
}
resultSet, err := checkResultSet(ctx, r, opt, isProject)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cmd/reviewdog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ See -reporter flag for migration and set -reporter="github-pr-review" or -report
default:
return fmt.Errorf("unknown -reporter: %s", opt.reporter)
case "github-check":
return runDoghouse(ctx, r, w, opt, isProject, true)
case "github-pr-check":
return runDoghouse(ctx, r, w, opt, isProject, false)
case "github-pr-check":
return runDoghouse(ctx, r, w, opt, isProject, true)
case "github-pr-review":
if os.Getenv("REVIEWDOG_GITHUB_API_TOKEN") == "" {
fmt.Fprintln(os.Stderr, "REVIEWDOG_GITHUB_API_TOKEN is not set")
Expand Down
0