todo(21): in-progress
parse_base_url and parse_repo_name accept SCP-style URLs for any host (e.g. git@git.code.tiararodney.com:h5p-mirror/foo.git) instead of rejecting everything but bitbucket.org. Non-SCP-style URLs (scheme://, missing colon) are still rejected with ValueError. Behavior for bitbucket.org URLs is unchanged. Unit tests cover Bitbucket- and Forgejo-shaped URLs plus the rejection cases, and pass via tox with no new mypy errors beyond the repo baseline.
This commit is contained in:
parent
936f9cb974
commit
1fd75e11c1
1 changed files with 1 additions and 15 deletions
16
TODO
16
TODO
|
|
@ -284,7 +284,7 @@ Content-Type: application/issue
|
||||||
ID: 21
|
ID: 21
|
||||||
Type: feature
|
Type: feature
|
||||||
Title: relax host restriction in vcs.git parse_base_url and parse_repo_name
|
Title: relax host restriction in vcs.git parse_base_url and parse_repo_name
|
||||||
Status: open
|
Status: in-progress
|
||||||
Priority: high
|
Priority: high
|
||||||
Created: 2026-06-06
|
Created: 2026-06-06
|
||||||
Relationships:
|
Relationships:
|
||||||
|
|
@ -297,17 +297,3 @@ Description: Both byteb4rb1e.utils.vcs.git.parse_base_url and parse_repo_name
|
||||||
#105) now feed Forgejo-shaped URLs like
|
#105) now feed Forgejo-shaped URLs like
|
||||||
'git@git.code.tiararodney.com:h5p-mirror/foo.git' through these
|
'git@git.code.tiararodney.com:h5p-mirror/foo.git' through these
|
||||||
helpers and hit the restriction.
|
helpers and hit the restriction.
|
||||||
|
|
||||||
The helpers' actual job is purely SCP-style parsing: extract the
|
|
||||||
owner/workspace segment, or the repo basename. Neither requires
|
|
||||||
knowing the host. The fix is to drop the host check while keeping
|
|
||||||
the SCP-style structural validation (must contain ':', must not
|
|
||||||
contain '//'). Update the docstrings to reflect that the host is
|
|
||||||
now arbitrary, and update the doctests if they assert on the
|
|
||||||
host-specific path.
|
|
||||||
|
|
||||||
Acceptance: both functions accept Forgejo and Bitbucket SCP URLs
|
|
||||||
and return the correct owner / repo name; the SCP-style format
|
|
||||||
check still rejects malformed inputs (no colon, contains '//' for
|
|
||||||
ssh:// or https://); existing call sites in any current consumer
|
|
||||||
continue to work; tests cover at least the Forgejo URL path.
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue