From 6b3abaa4d663384217b0bf3a8a0928a1430a44fa10fccfeaa830d7e4e8fa4c18 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Wed, 10 Jul 2024 10:59:27 +0200 Subject: [PATCH] . --- bots-common/gitea_utils.go | 2 +- pr-review/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bots-common/gitea_utils.go b/bots-common/gitea_utils.go index e9de175..19a6b4d 100644 --- a/bots-common/gitea_utils.go +++ b/bots-common/gitea_utils.go @@ -100,7 +100,7 @@ func (h *RequestHandler) CreatePullRequest(repo *models.Repository, srcId, targe client := apiclient.New(transport, nil) var prOptions models.CreatePullRequestOption - prOptions.Base = repo.Parent.DefaultBranch + prOptions.Base = repo.DefaultBranch prOptions.Head = srcId pr, err := client.Repository.RepoCreatePullRequest( diff --git a/pr-review/main.go b/pr-review/main.go index 525ca44..6b39580 100644 --- a/pr-review/main.go +++ b/pr-review/main.go @@ -43,7 +43,7 @@ PullRequest: %s#%d`, req.Repository.Name, GitAuthor, req.Repository.Name, req.Pu h.GitExec(path.Join(common.DefaultGitPrj, req.Repository.Name), "fetch", "--depth", "1", "origin", req.Pull_Request.Head.Sha) h.GitExec(path.Join(common.DefaultGitPrj, req.Repository.Name), "checkout", req.Pull_Request.Head.Sha) h.GitExec(common.DefaultGitPrj, "commit", "-a", "-m", commitMsg) - h.GitExec(common.DefaultGitPrj, "push", "origin", branchName) + h.GitExec(common.DefaultGitPrj, "push", "-f", "origin", branchName) PR := h.CreatePullRequest(prjGit, branchName, prjGit.DefaultBranch) if h.HasError() {