Skip to content

Commit

Permalink
Fix scope and internall error handling (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
mszostok authored Apr 13, 2022
1 parent 4e0aa9d commit 436c7ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/check/valid_owner.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ func (*ValidOwner) checkRequiredScopes(header http.Header) error {
gotScopes := strings.Split(header.Get(scopeHeader), ",")
presentScope := map[github.Scope]struct{}{}
for _, scope := range gotScopes {
scope = strings.TrimSpace(scope)
presentScope[github.Scope(scope)] = struct{}{}
}

Expand Down
4 changes: 4 additions & 0 deletions internal/runner/runner_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ func (r *CheckRunner) collectMetrics(checkOut check.Output, err error) {
r.allFoundIssues[i.Severity]++
}

if err != nil {
r.allFoundIssues[check.Error]++
}

if len(checkOut.Issues) > 0 || err != nil {
r.notPassedChecksCnt++
}
Expand Down

0 comments on commit 436c7ac

Please sign in to comment.