summaryrefslogtreecommitdiff
path: root/cmd/generate
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/generate')
-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))