-
Notifications
You must be signed in to change notification settings - Fork 49
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
repository
validation fails in some cases
#116
Comments
We don't actually look at the branch from parse-github-url, you can set the branch used for the rule in the root package.json: "manypkg": {
"defaultBranch": "main"
} |
Hah, right! I've just checked that in here we get incorrect~ (in my situation) branch and I've assumed that it's the culprit. Since most of the stuff is really convention-based and not configuration-based. Why this option does exist? Why it was not chosen to validate and fix the |
What would the root repository field look like with the branch name included? afaik, there isn't a form that would include it? |
If we visit https://github.com/Thinkmill/manypkg and press Y on the keyboard we are being redirected to an URL containing the hash (eg. https://github.com/Thinkmill/manypkg/tree/5f6cdedf6843d60144c1ea65b5a8ef0c4b7f0bd5) - the URL isn't really bound to a hash though, it can take any git revision. So we can just replace this with a branch name and end up with a valid URL such as: https://github.com/Thinkmill/manypkg/tree/master |
I did not know that was a thing! Supporting that would be great |
Can't say it's anywhere on my todo list but it's great to keep this as an issue "for the better times" 😉 |
TIL that "repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"directory": "packages/react-dom"
} https://docs.npmjs.com/cli/v6/configuring-npm/package-json#repository |
Yeah though I'm not sure I've seen anything that actually uses it, e.g. the repository link for https://www.npmjs.com/package/react goes to the root of the repo which is quite annoying but the link on https://www.npmjs.com/package/@emotion/react goes to the package directory |
For this:
we get this back from
parse-github-url
:As we might notice the
branch
has defaulted tomaster
which in turn makes per-packagerepository
field like https://github.com/Thinkmill/manypkg/tree/main/packages/cli incorrect and results in the error:The quickest fix for me was to just remove the root
"repository"
field but I think that the situation here should be improved so nobody would face that in the future.The text was updated successfully, but these errors were encountered: