internal/source: support github.* URLs
These URLs are used by some GitHub Enterprise Server customers.
For golang/go#48542
Trust: Jonathan Amsterdam
Run-TryBot: Jonathan Amsterdam
TryBot-Result: kokoro
@@ -638,6 +638,11 @@ var patterns = []struct {
pattern: `^(?P<repo>github\.com/[a-z0-9A-Z_.\-]+/[a-z0-9A-Z_.\-]+)`,
templates: githubURLTemplates,
},
+ {
+ // Assume that any site beginning with "github." works like github.com.
+ pattern: `^(?P<repo>github\.[a-z0-9A-Z.-]+/[a-z0-9A-Z_.\-]+/[a-z0-9A-Z_.\-]+)(\.git|$)`,
+ templates: githubURLTemplates,
+ },
{
pattern: `^(?P<repo>bitbucket\.org/[a-z0-9A-Z_.\-]+/[a-z0-9A-Z_.\-]+)`,
templates: bitbucketURLTemplates,
