use remoteAction.URL if not empty (#71)
Fixes https://github.com/go-gitea/gitea/issues/25615 Reviewed-on: https://gitea.com/gitea/act/pulls/71 Co-authored-by: sati.ac <sati.ac@noreply.gitea.com> Co-committed-by: sati.ac <sati.ac@noreply.gitea.com>
This commit is contained in:
parent
eb19987893
commit
3813f40cba
1 changed files with 7 additions and 2 deletions
|
@ -215,9 +215,14 @@ type remoteAction struct {
|
|||
}
|
||||
|
||||
func (ra *remoteAction) CloneURL(u string) string {
|
||||
if !strings.HasPrefix(u, "http://") && !strings.HasPrefix(u, "https://") {
|
||||
u = "https://" + u
|
||||
if ra.URL == "" {
|
||||
if !strings.HasPrefix(u, "http://") && !strings.HasPrefix(u, "https://") {
|
||||
u = "https://" + u
|
||||
}
|
||||
} else {
|
||||
u = ra.URL
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s/%s/%s", u, ra.Org, ra.Repo)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue