Deprecated: Use repoutil.NewCloneLink instead.
(isWiki bool)
| 741 | |
| 742 | // Deprecated: Use repoutil.NewCloneLink instead. |
| 743 | func (r *Repository) cloneLink(isWiki bool) *repoutil.CloneLink { |
| 744 | repoName := r.Name |
| 745 | if isWiki { |
| 746 | repoName += ".wiki" |
| 747 | } |
| 748 | |
| 749 | r.Owner = r.MustOwner() |
| 750 | cl := new(repoutil.CloneLink) |
| 751 | if conf.SSH.Port != 22 { |
| 752 | cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", conf.App.RunUser, conf.SSH.Domain, conf.SSH.Port, r.Owner.Name, repoName) |
| 753 | } else { |
| 754 | cl.SSH = fmt.Sprintf("%s@%s:%s/%s.git", conf.App.RunUser, conf.SSH.Domain, r.Owner.Name, repoName) |
| 755 | } |
| 756 | cl.HTTPS = repoutil.HTTPSCloneURL(r.Owner.Name, repoName) |
| 757 | return cl |
| 758 | } |
| 759 | |
| 760 | // CloneLink returns clone URLs of repository. |
| 761 | // |
no test coverage detected