Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select branch #103

Closed
javierlinked opened this issue Jan 4, 2025 · 7 comments
Closed

Select branch #103

javierlinked opened this issue Jan 4, 2025 · 7 comments
Labels
suggestion New feature or request

Comments

@javierlinked
Copy link
Contributor

Would be good to select a branch.

@cyclotruc
Copy link
Owner

This is partly possible already using an url like:
gitingest.com/name/repo/tree/branch_name

But there's currently a bug with branches that contain a / in the name

Did you mean like an UI thing to select from there?

@javierlinked
Copy link
Contributor Author

javierlinked commented Jan 5, 2025

Correct, I don't see a way to set a branch from a remote repo unless I clone it and use the pip locally.

It'd be good to have an optional set to choose a branch.

@cyclotruc
Copy link
Owner

Have you tried this approach?
image

@javierlinked
Copy link
Contributor Author

Hi @cyclotruc, I've just tried. Both are true. It does work with the with the full github branch url. And it does also fail when there's a / in the name, which is the case of most conventional commits.

If I find some time I'd try to prepare a PR to help you in this. This project is really useful. Congrats and thanks.

@cyclotruc
Copy link
Owner

@javierlinked Thank you, this would be very much appreciated.

The implementation I was thinking about:

  • Since in clone.py there's a function to check if a repo exists using a curl request (then looking if there's a 404)
  • We could probbably use that same approach to test multiple "candidate" urls at once (leveragind Asyncio for concurrency)

This shouldn't take too much extra time but could allow us to do much more complex pattern matching (like make the url trick work for some other common git provider)

Happy to answer all your questions if you have any

@cyclotruc
Copy link
Owner

#108

@cyclotruc cyclotruc added the suggestion New feature or request label Jan 7, 2025
@cyclotruc
Copy link
Owner

Closing this since the merge of #131 should have fixed this behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants