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

Error when branch name contains a forward slash #3

Open
xtqqczze opened this issue Jul 9, 2024 · 2 comments
Open

Error when branch name contains a forward slash #3

xtqqczze opened this issue Jul 9, 2024 · 2 comments

Comments

@xtqqczze
Copy link

xtqqczze commented Jul 9, 2024

@MihaZupan runtime-utils doesn't handle a branch containing a forward slash properly, i.e.:

https://github.com/xtqqczze/dotnet-runtime/tree/draft/VectorGetArrayDataReference

[00:00:34] [Setup runtime] + git remote add combineWith1 https://github.com/xtqqczze/dotnet-runtime
[00:00:34] [Setup runtime] + git fetch combineWith1 draft
[00:00:34] [Setup runtime] fatal: couldn't find remote ref draft

Originally posted by @xtqqczze in MihuBot#491 (comment)

@MihaZupan
Copy link
Owner

MihaZupan commented Jul 9, 2024

This isn't an issue if you start the bot by mentioning it on a PR since that's taking the branch from GH's API:
https://github.com/MihaZupan/MihuBot/blob/ab1e739fac5d3a8f018f4e967b7a3272ae8e475b/MihuBot/MihuBot/RuntimeUtils/JobBase.cs#L97

If you start it with a custom branch from the Web UI, we'd try to parse it from the URL instead.
https://github.com/MihaZupan/MihuBot/blob/ab1e739fac5d3a8f018f4e967b7a3272ae8e475b/MihuBot/MihuBot/Pages/RuntimeUtils.razor#L347-L355
I don't think there's a way to handle slashes without calling into GH's API to get a list of all branches.
Looks like that part's also missing allowing the . in the Regex pattern.

@xtqqczze
Copy link
Author

Yeah, I also came to the conclusion it's not possible to use regex to handle forward slashes while still handling, i.e.:
https://github.com/MihaZupan/performance/blob/regex/.gitignore#L5

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

No branches or pull requests

2 participants