Skip to content

Commit 436c7ac

Browse files
authored
Fix scope and internall error handling (#145)
1 parent 4e0aa9d commit 436c7ac

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

internal/check/valid_owner.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ func (*ValidOwner) checkRequiredScopes(header http.Header) error {
375375
gotScopes := strings.Split(header.Get(scopeHeader), ",")
376376
presentScope := map[github.Scope]struct{}{}
377377
for _, scope := range gotScopes {
378+
scope = strings.TrimSpace(scope)
378379
presentScope[github.Scope(scope)] = struct{}{}
379380
}
380381

internal/runner/runner_worker.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ func (r *CheckRunner) collectMetrics(checkOut check.Output, err error) {
9595
r.allFoundIssues[i.Severity]++
9696
}
9797

98+
if err != nil {
99+
r.allFoundIssues[check.Error]++
100+
}
101+
98102
if len(checkOut.Issues) > 0 || err != nil {
99103
r.notPassedChecksCnt++
100104
}

0 commit comments

Comments
 (0)