feat: infer gitea api_domain from domain, if unspecified.#675
Conversation
7467cbf to
077f0c0
Compare
bernardcooke53
left a comment
There was a problem hiding this comment.
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
domainitself (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.