Skip to content

bext: update private repo sync banners

Created by: taras-yemets

Closes issues/31920.

See also PR https://github.com/sourcegraph/sourcegraph/pull/31690 discussion.

Show different instructions on the options page for repo not found error depending on Sourcegraph URL and whether the user is admin.

Sourcegraph instance User is admin Screenshot Notes
Cloud Screenshot from 2022-03-24 15-38-02 Sourceraph button text is 'Configure on Sourcegraph'. It navigates to user settings manage repositories page with current repo name as filter query.
Self-hosted / managed Screenshot from 2022-03-24 14-23-46 - Link in the extension popup navigates user to add repos docs page
- Sourceraph button text is 'Repository not found'. It still links to the repository, but will show 'Not Found' page. This information is just for context, the button is not the matter of change of this PR.
Self-hosted / managed Screenshot from 2022-03-24 15-37-27 ️ See notes on the Sourcegraph button for the on-prem / managed instance admin user.

UPD: updated copies according to this comment repo sync

Test plan

  • sg run bext
  • Sourcegraph cloud instance
    • set Sourcegraph URL to Sourcegrpah Cloud
    • log in to your cloud account
    • go to the private repository page which is not synced in user settings
    • check the private repo message on the options page (see screenshots above)
  • Sourcegraph on-prem / managed instance
    • set Sourcegrpah URL to on-prem / managed instance
    • log in as non-admin user
    • check not-synced repo message on the options page (see screenshots above)
    • log in as admin user
    • check not-synced repo message for the admin user (see screenshots above)

App preview:

Merge request reports

Loading