Skip to content

refactor: extract RepoPathFromURL to deduplicate Git URL normalization#145

Merged
alecthomas merged 2 commits intomainfrom
aat/repo-path-from-url
Feb 24, 2026
Merged

refactor: extract RepoPathFromURL to deduplicate Git URL normalization#145
alecthomas merged 2 commits intomainfrom
aat/repo-path-from-url

Conversation

@alecthomas
Copy link
Copy Markdown
Collaborator

Three functions (clonePathForURL, spoolDirForURL, snapshotDirForURL)
duplicated the same url.Parse + TrimSuffix(".git") + filepath.Join
pattern. Extract a shared gitclone.RepoPathFromURL primitive and
propagate parse errors instead of silently falling back to "unknown".

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

alecthomas and others added 2 commits February 23, 2026 11:52
Three functions (clonePathForURL, spoolDirForURL, snapshotDirForURL)
duplicated the same url.Parse + TrimSuffix(".git") + filepath.Join
pattern. Extract a shared gitclone.RepoPathFromURL primitive and
propagate parse errors instead of silently falling back to "unknown".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Apply the scheduler queue prefix to the job id instead of the queue,
and format jobKey as id:queue. This produces log output like
git-snapshot-periodic:https://github.com/org/repo instead of
git-https://github.com/org/repo:snapshot-periodic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alecthomas alecthomas requested a review from a team as a code owner February 23, 2026 02:42
@alecthomas alecthomas requested review from wsutina and removed request for a team February 23, 2026 02:42
@alecthomas alecthomas enabled auto-merge (squash) February 23, 2026 02:42
@alecthomas alecthomas merged commit ae7dae3 into main Feb 24, 2026
7 of 9 checks passed
@alecthomas alecthomas deleted the aat/repo-path-from-url branch February 24, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant