Set all contexts for view upon sign in #97
Merged
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.
Set all contexts for view upon sign in and refresh
Fixes:
The problem is that when logging in the context only gets set for the login and there are 3 contexts related to the View (
github-actions.signed-in,github-actions.has-repos, andgithub-actions.internet-access). The view checks for these invscode-github-actions/package.json.They are reading for the
whencondition, and there is an issue where if you download the extension, enable it, and THEN you login at that point, that the contexts for repo and internet are not set, so that causes the view not to change. So the user is actually logged in, but the view isn't triggered to change.This change adds two additional checks for
has-reposandinternet-accesswhen a user signs in.Demo of broken state before fix:

Demo of fixed state:

Co-authored from @KetchupOnMyKetchup and @lrotschy