Skip to content

Commit

Permalink
Merge pull request #1835 from reviewdog/fix-filtering
Browse files Browse the repository at this point in the history
Fix filtering with github-[pr-]check reporter
  • Loading branch information
haya14busa authored Jul 14, 2024
2 parents d68acfc + ca1f5cc commit 8a74512
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### :rotating_light: Breaking changes
- ...

## [v0.20.1] - 2024-07-10

### :bug: Fixes
- [#1835](https://github.com/reviewdog/reviewdog/pull/1835) Fix -filter-mode
didn't work with github-[pr-]check reporter for graceful degradation cases.
i.e. GitHub token doesn't have write permission (e.g. PR from forked repo).

## [v0.20.0] - 2024-07-07

This version is created by mistake and is the same as v0.19.0.
Expand Down Expand Up @@ -261,4 +268,6 @@ See https://github.com/reviewdog/reviewdog/releases for older release note.
[v0.18.0]: https://github.com/reviewdog/reviewdog/compare/v0.17.5...v0.18.0
[v0.18.1]: https://github.com/reviewdog/reviewdog/compare/v0.18.0...v0.18.1
[v0.19.0]: https://github.com/reviewdog/reviewdog/compare/v0.18.1...v0.19.0
[v0.20.0]: https://github.com/reviewdog/reviewdog/compare/v0.19.0...v0.20.0
[v0.20.1]: https://github.com/reviewdog/reviewdog/compare/v0.20.0...v0.20.1
[@haya14busa]: https://github.com/haya14busa
3 changes: 3 additions & 0 deletions service/github/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func (ch *Check) Flush(ctx context.Context) error {
if err, ok := err.(*github.ErrorResponse); ok && err.Response.StatusCode == http.StatusForbidden && cienv.IsInGitHubAction() {
logWriter := githubutils.NewGitHubActionLogWriter(ch.Level)
for _, c := range ch.postComments {
if !c.Result.ShouldReport {
continue
}
if err := logWriter.Post(ctx, c); err != nil {
return err
}
Expand Down

0 comments on commit 8a74512

Please sign in to comment.