summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-05-18 22:06:14 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-05-18 22:06:14 -0600
commitc2e8f35cb7ca5cd6f82fd7fc86b9f91d26dd7ddf (patch)
tree18a2f5a4befee07530311bf3d167d071884aaa9f
parent2af7f7f89dba2ff935ca4e4958264380a98e074e (diff)
imworkingon: Synthesize GitLab upstreams
-rw-r--r--cmd/generate/main.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/generate/main.go b/cmd/generate/main.go
index 0d253af..6686605 100644
--- a/cmd/generate/main.go
+++ b/cmd/generate/main.go
@@ -134,6 +134,14 @@ func mainWithError() error {
Name: user + "/" + repo,
}
}
+ if m := reGitLabMR.FindStringSubmatch(c.URLs[0]); m != nil {
+ authority := m[1]
+ projectID := m[2]
+ return Upstream{
+ URLs: []string{"https://" + authority + "/" + projectID},
+ Name: projectID,
+ }
+ }
// :(
return Upstream{
URLs: []string{c.URLs[0]},