Skip to content

Commit cfb7820

Browse files
committed
Drop this out of an else block.
1 parent 4a022f7 commit cfb7820

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/http/handler.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,14 @@ func PATScopeFilter(b *inventory.Builder, r *http.Request, fetcher scopes.Fetche
273273
if tokenInfo.TokenType == utils.TokenTypePersonalAccessToken {
274274
if tokenInfo.ScopesFetched {
275275
return b.WithFilter(github.CreateToolScopeFilter(tokenInfo.Scopes))
276-
} else {
277-
scopesList, err := fetcher.FetchTokenScopes(ctx, tokenInfo.Token)
278-
if err != nil {
279-
return b
280-
}
276+
}
281277

282-
return b.WithFilter(github.CreateToolScopeFilter(scopesList))
278+
scopesList, err := fetcher.FetchTokenScopes(ctx, tokenInfo.Token)
279+
if err != nil {
280+
return b
283281
}
282+
283+
return b.WithFilter(github.CreateToolScopeFilter(scopesList))
284284
}
285285

286286
return b

0 commit comments

Comments
 (0)