GitRemote.extractRepositoryPath and the config parser disagree on which characters a repository slug may hold #562
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#562
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GitRemote.extractRepositoryPathaccepts characters in a repository slug thatGitLab cannot issue —
#,?, a space,%— while the.iw/config.confparser rejects the same characters. The two sources of the same value therefore
disagree on what a valid slug is.
Found while working IW-558 (
GitLabClient.encodedRepo). The encoding defectitself is fixed:
encodedReponow percent-encodes the slug as one pathsegment, so a corrupting character can no longer break a
glab apipath. Thisfollow-up is about the input side — whether a slug that the config parser
would refuse should be able to arrive from a git remote URL at all.
Consider aligning the two: either the remote extractor applies the config
parser's character rule, or the config parser relaxes to match the extractor.
One rule, one place.
References:
core/model/Config.scala—extractRepositoryPath,repositoryOwnerAndName, config parseproject-management/issues/IW-558/analysis.md(Hypothesis 2)Intake: agent-ready
Workflow: diagnostic
Reason: all gates passed
Analysis: project-management/issues/IW-562/analysis.md on branch IW-562