summaryrefslogtreecommitdiff
path: root/cmd/generate/main.go
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-05-18 22:05:36 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-05-18 22:05:36 -0600
commit2af7f7f89dba2ff935ca4e4958264380a98e074e (patch)
tree5131d7588b5f4779a2b502001f28fd65d742f75a /cmd/generate/main.go
parentc89f1dfaf9d83075662f65fc3f99d5550f1760c4 (diff)
imworkingon: Fix synthesized GitHub upstreams
Diffstat (limited to 'cmd/generate/main.go')
-rw-r--r--cmd/generate/main.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmd/generate/main.go b/cmd/generate/main.go
index e322e5c..0d253af 100644
--- a/cmd/generate/main.go
+++ b/cmd/generate/main.go
@@ -125,12 +125,20 @@ func mainWithError() error {
}
}
}
+ // Now try to synthesize an upstream.
if m := reGitHubPR.FindStringSubmatch(c.URLs[0]); m != nil {
user := m[1]
repo := m[2]
- return Upstream{URLs: []string{c.URLs[0]}, Name: user + "/" + repo}
+ return Upstream{
+ URLs: []string{"https://github.com/" + user + "/" + repo},
+ Name: user + "/" + repo,
+ }
+ }
+ // :(
+ return Upstream{
+ URLs: []string{c.URLs[0]},
+ Name: "???",
}
- return Upstream{URLs: []string{c.URLs[0]}, Name: "???"}
},
}).
Parse(htmlTmplStr))