Skip to content

Comments

feat: add support for git branch via ssh and shorthand URLs#393

Open
dingruoqian99 wants to merge 1 commit intovercel-labs:mainfrom
dingruoqian99:feature/ssh-branch-support
Open

feat: add support for git branch via ssh and shorthand URLs#393
dingruoqian99 wants to merge 1 commit intovercel-labs:mainfrom
dingruoqian99:feature/ssh-branch-support

Conversation

@dingruoqian99
Copy link
Contributor

Summary

Added support for pulling from specific git branches using the #branch suffix in SSH URLs and GitHub shorthand.

Problem/Background

The CLI previously only supported branch selection for GitHub/GitLab HTTPS URLs formatted like .../tree/branch. Users could not specify a branch when using SSH URLs or shorthand syntax, which is essential for private repositories or specific development branches.

Solution

  • Updated parseSource to recognize the # fragment as a git ref (branch/tag/commit).
  • Handled SSH and shorthand URLs to preserve the branch information.
  • Updated fetchSkillFolderHash to use the specified branch when checking for updates on GitHub.
  • Added comprehensive tests for SSH branch formats and shorthand branch formats.

Testing

  • Added unit tests in tests/source-parser.test.ts
  • Verified with manual test script for various URL formats
  • Ran full test suite to ensure no regressions

@dingruoqian99
Copy link
Contributor Author

This PR resolves #394

@dingruoqian99
Copy link
Contributor Author

@quuu trouble you to take a look at this

@quuu
Copy link
Collaborator

quuu commented Feb 19, 2026

@dingruoqian99 im currently working on moving away from needing the tree folder hash (using the github API) which would also remove the need to hardcode and check main/master/ default branch

Let me see if i can go ahead with the more future proof change, before merging this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants