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

Added failing test for forward slashed branch name #114

Closed

Conversation

taras
Copy link

@taras taras commented Oct 8, 2020

Motivation

backstage/backstage#2815

Approach

I created a failing test for this scenario.

🤷‍♀️ not sure how to fix it. Open to suggestions.

@taras taras mentioned this pull request Oct 8, 2020
@IonicaBizau
Copy link
Owner

Well... the pathname could be parsed depending on what you are expecting it to be...

In your example, if I understand well, there are the following cases:

https://github.com/42IonicaBizau/git-url-parse/blob/dependabot/npm_and_yarn/graphql-15.0.0/package.json

Branch: dependabot 
Filepath: npm_and_yarn/graphql-15.0.0/package.json

Branch: dependabot/npm_and_yarn
Filepath: graphql-15.0.0/package.json

Branch: dependabot/npm_and_yarn/graphql-15.0.0
Filepath: package.json

Perhaps even this:
Branch: dependabot/npm_and_yarn/graphql-15.0.0/package.json
No filepath

@taras
Copy link
Author

taras commented Oct 9, 2020

Yeah, this is the tricky bit. There isn't really a way to know where the branch name ends and file path begins.

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.

None yet

2 participants