Fail early during local run if the token is not valid#263
Open
GuillaumeLagrange wants to merge 2 commits intomainfrom
Open
Fail early during local run if the token is not valid#263GuillaumeLagrange wants to merge 2 commits intomainfrom
GuillaumeLagrange wants to merge 2 commits intomainfrom
Conversation
Since we are not going to upload the result anyway, we should still be able to perform the run if the API is not available. This allows offline usage during dev or in a very controlled sandbox environment that only outputs profile.
1. Repo found
a. Logged in: user is set, repositoryOverview is set — repo found
b. NOT logged in: user is null, repositoryOverview is set => bails
with "session expired"
2. REPOSITORY_NOT_FOUND => falls through to `get_or_create_project_repository`
a. Logged in: `get_or_create_project_repository` succeeds
b. NOT logged in: `get_or_create_project_repository` fails, bail with
"session expired"
77b4420 to
f4d85a8
Compare
adriencaccia
approved these changes
Mar 11, 2026
|
|
||
| /// Resolve repository information from override, git remote, or API fallback | ||
| /// | ||
| /// When there is no explicit repository overrid, this flow also makes sure the user is logged in with a valid token |
Member
There was a problem hiding this comment.
Suggested change
| /// When there is no explicit repository overrid, this flow also makes sure the user is logged in with a valid token | |
| /// When there is no explicit repository override, this flow also makes sure the user is logged in with a valid token |
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.
Tested scenarii
user logged in, private repo with no access ✅
user logged in, repo that does not exist ✅
user logged in, private repo with access ✅
user token expired, public repo ✅
user token expired, private repo with no access ✅
user token expired, repo that does not exist ✅
user token expired, private repo with access ✅
user not logged in, public repo ✅
user not logged in, private repo ✅
user not logged in, repo that does not exist ✅
user logged in, public repo