Skip to content

Commit

Permalink
internal/source: support github.* URLs
Browse files Browse the repository at this point in the history
These URLs are used by some GitHub Enterprise Server customers.

For golang/go#48542

Change-Id: Iace7e9db14fcb776669c2ae581a7508c188c1aca
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/351276
Trust: Jonathan Amsterdam <[email protected]>
Run-TryBot: Jonathan Amsterdam <[email protected]>
TryBot-Result: kokoro <[email protected]>
Reviewed-by: Jamal Carvalho <[email protected]>
  • Loading branch information
jba committed Sep 24, 2021
1 parent d47c5d0 commit 22dfb1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/source/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 22dfb1f

Please sign in to comment.