bext: fix show repo on Sourcegraph button rendering logic on GitHub
Created by: taras-yemets
Fixes 'Show on Sourcegraph' icon button rendering logic on GitHub (regression introduced by https://github.com/sourcegraph/sourcegraph/pull/31922).
Previously icon button was not rendered if the current user settingsURL
value was not defined.
If the user is not logged in their Sourcegraph instance curentUser
value returned by the API expectedly is null
, and the 'Show on Sourcegraph' icon button should still be rendered.
Test plan
sg run bext
- ensure you're not logged in into browser extension active current Sourcegraph instance
- open public repo page on GitHub and check whether the Sourcegraph icon button is rendered
- ensure use cases from https://github.com/sourcegraph/sourcegraph/pull/31922 test plan are passing