Skip to content
Snippets Groups Projects

VSCE: Implement function to validate current branch

Merged Administrator requested to merge bee/vsce-links-commands into main

Created by: abeatrix

Close https://github.com/sourcegraph/sourcegraph/issues/34591

Summary

This PR implements a function to check if the current branch exists on the sourcegraph instance

If the user is currently on a branch that does not exist remotely, the links-commands will open the repo using the "HEAD" (aka main) branch unless a default branch has been set

Expected Behavior

For local files, users can choose between open / copy the main branch and the current branch.

  • If the current branch does not exist remotely, it will fall back to the main branch.
  • If the default branch is set, it will replace the current branch option when clicked.

Screen Shot 2022-05-17 at 9 26 58 PM

For remote files, only current branch is available: Screen Shot 2022-05-17 at 9 26 44 PM

TODO

Test plan

Manually tested. See loom video

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Merged by avatar (Apr 29, 2025 8:32pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading