wikiRemoteURL returns accessible repository URL for wiki if exists. Otherwise, it returns an empty string.
(remote string)
| 782 | // wikiRemoteURL returns accessible repository URL for wiki if exists. |
| 783 | // Otherwise, it returns an empty string. |
| 784 | func wikiRemoteURL(remote string) string { |
| 785 | remote = strings.TrimSuffix(remote, ".git") |
| 786 | for _, suffix := range commonWikiURLSuffixes { |
| 787 | wikiURL := remote + suffix |
| 788 | if isMirrorURLAccessible(time.Minute, wikiURL) { |
| 789 | return wikiURL |
| 790 | } |
| 791 | } |
| 792 | return "" |
| 793 | } |
| 794 | |
| 795 | // MigrateRepository migrates a existing repository from other project hosting. |
| 796 | func MigrateRepository(doer, owner *User, opts MigrateRepoOptions) (*Repository, error) { |
no test coverage detected