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

gerrit url format support #815

Closed
tulequ opened this issue Nov 24, 2023 · 4 comments
Closed

gerrit url format support #815

tulequ opened this issue Nov 24, 2023 · 4 comments
Labels

Comments

@tulequ
Copy link

tulequ commented Nov 24, 2023

What happened?
Branch regex not working with gerrit
In Gerrit: url in format https://gerrit.googlesource.com/k8s-gerrit

Which is not match regex if we want to specify branch

branchRegEx      = regexp.MustCompile(`^([^@]*(?:git@)?[^@/]+/[^@/]+/[^@/]+)@([a-zA-Z0-9\./\-\_]+)$`)

How can we reproduce the bug? (as minimally and precisely as possible)

devpod up https://gerrit.googlesource.com/k8s-gerrit@example
16:15:07 error Try using the --debug flag to see a more verbose output
16:15:07 fatal https://gerrit.googlesource.com/k8s-gerrit@example is neither a local folder, git repository or docker image
@tulequ
Copy link
Author

tulequ commented Nov 26, 2023

another problem is username in gerrit is real username (not git), so git@ will not match

@pascalbreuninger
Copy link
Member

@tulequ thanks for opening the issue. To be honest, I have never even heard of gerrit until now.
The branch problem should be fixed with #819 and you can start it like so:
devpod up $WORKSPACE_NAME --source=git:https://gerrit.googlesource.com/k8s-gerrit@example
This will force the cli to treat it as git repository and afterwards, both commit and branch checkouts should work (after the next patch release)

How do PRs work in gerrit? Do you need to link to them as well?

@tulequ
Copy link
Author

tulequ commented Nov 27, 2023

Example gerrit patchset (~PR) in gerrit (you can click Download button for guide)
https://chromium-review.googlesource.com/c/chromium/src/+/5056576

But I don't intent to use with PR, only branch is need

@pascalbreuninger
Copy link
Member

the fix landed in v0.5.0-alpha.0, closing this issue.

Let us know if you encounter more problems with Gerrit!

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

No branches or pull requests

2 participants