Repository navigation
fix: refresh GitLab OAuth2 token on 401 during long runs - #10
Merged
Merged
Conversation
Long-running analyses on large GitLab groups fail mid-run because the glab CLI OAuth2 token expires (~2h). Add a token refresh callback to the GitLab provider that re-invokes glab CLI on 401 responses, retrying the request once with the fresh token. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tokenRefreshcallback to the GitLab provider that re-invokesglab auth status -ton 401 responses, retrying the request once with the fresh tokenTest plan
go test ./internal/provider/...— 3 new tests for token refresh (success, no callback, refresh failure)go test ./...— all 17 packages passgo vet ./...— clean🤖 Generated with Claude Code