Fix cloning for src.suse.de instance #22

Merged
adamm merged 1 commits from adrianSuSE/autogits:main into main 2025-04-02 14:18:54 +02:00
Member
No description provided.
adamm reviewed 2025-04-02 13:52:25 +02:00
@@ -57,8 +57,9 @@ func failOnError(err error, msg string) {
func fetchPrGit(git common.Git, pr *models.PullRequest) error {
// clone PR head and base and return path
cloneURL, nil := common.TranslateHttpsToSshUrl(pr.Head.Repo.CloneURL)
Owner

add a flag parameter "--use-ssh-clone" (could be global) and then add condition here if (UseSSHClone) { }.

so,

cloneURL := pr.Head.Repo.CloneURL
if (UseSSHClone) {
cloneURL = pr.Head.Repo.SSHURL
}

add a flag parameter "--use-ssh-clone" (could be global) and then add condition here if (UseSSHClone) { }. so, cloneURL := pr.Head.Repo.CloneURL if (UseSSHClone) { cloneURL = pr.Head.Repo.SSHURL }
adamm marked this conversation as resolved
adamm reviewed 2025-04-02 13:53:10 +02:00
@@ -604,3 +607,3 @@
flag.Int64Var(&ProcessIDOnly, "id", -1, "Process only the specific ID and ignore the rest. Use for debugging")
flag.StringVar(&BuildRoot, "build-root", "", "Default build location for staging projects. Default is bot's home project")
giteaHost := flag.String("gitea", "src.opensuse.org", "Gitea instance")
flag.StringVar(&giteaHost, "gitea", "src.opensuse.org", "Gitea instance")
Owner

add a flag parameter "use-ssh-clone" here

add a flag parameter "use-ssh-clone" here
Owner

Then you also don't need to expose giteaHost as global

Then you also don't need to expose giteaHost as global
adrianSuSE force-pushed main from a908020482 to b7625cd4c4 2025-04-02 14:15:16 +02:00 Compare
adamm merged commit b7625cd4c4 into main 2025-04-02 14:18:54 +02:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: git-workflow/autogits#22