-
Notifications
You must be signed in to change notification settings - Fork 255
feat: infer gitea api_domain from domain, if unspecified. #675
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
feat: infer gitea api_domain from domain, if unspecified. #675
Conversation
7467cbf
to
077f0c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good @lukester1975 - would you mind adding a change to the docs explaining that this can be inferred for Gitea servers?
Also re: your PS - as you say, I'm sure it's more than a one-line change. I think it's a nice idea, though, as long as the configuration parsing doesn't get super complex as a result |
I think I did look but couldn't see any existing documentation for |
Struck me there's a simpler (almost 1 line) approach: lukester1975@907840f That said I don't think it's correct if the http access is via a subpath. E.g. remote_url: No way to infer that If you think this is a non-starter I'll see if I can find time to dig out the url from pyproject.toml. Thanks |
You're right, the options should be under the remote table but aren't yet. Was thinking through the relative tradeoff between being simple and explicit (maybe causing duplication) and convenience having things auto-detected.
That way we'd have a sensible set of locations and defaults, but we're somewhat consistent in how things are detected and when you have to specify things. Not suggesting all that has to go into a PR here, but keen to hear what you think 🙂 |
Probably put 3 before 2 due to the ssh/https issue and subpaths? |
077f0c0
to
01a97bd
Compare
01a97bd
to
4eca132
Compare
4eca132
to
14e911b
Compare
Hello again
For a gitea repo how about implying the
api_domain
(when not specified) fromdomain
? Saves a bit more config.Thanks
PS how about inferring
domain
itself (when not provided) from pyproject.tomlproject.urls.repository
(if provided)? I had a quick look but given the code drops everything but[tool.semantic_release]
from pyproject.toml immediately after parsing it, the change seemed like more than a one-liner. Happy to have a look if you think it's sensible.