From 61b6191af2505d7c338e75eb88795541ae184921ea28f4a54a4340dcc28d08d8 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Tue, 16 Jul 2024 15:04:53 +0200 Subject: [PATCH] . --- pr-review/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pr-review/main.go b/pr-review/main.go index 0e285c0..f9d64bc 100644 --- a/pr-review/main.go +++ b/pr-review/main.go @@ -59,7 +59,7 @@ func processPullRequestSync(h *common.RequestHandler) error { h.Log("associated pr: %v", prjPr) h.GitExec("", "clone", "--branch", prjPr.Head.Name, "--depth", "1", prjPr.Head.Repo.SSHURL, common.DefaultGitPrj) - commitId, ok := h.GitSubmoduleCommitId(common.DefaultGitPrj, req.Repository.Name, prjPr.Head.Name) + commitId, ok := h.GitSubmoduleCommitId(common.DefaultGitPrj, req.Repository.Name, prjPr.Head.Sha) if !ok { return fmt.Errorf("Cannot fetch submodule commit id in prjgit for '%s'", req.Repository.Name) @@ -74,6 +74,9 @@ func processPullRequestSync(h *common.RequestHandler) error { Update to %s`, req.Pull_Request.Head.Sha) + h.Log("will create new commit msg: %s", commitMsg) + h.Log("error? %v", h.Error) + // we need to update prjgit PR with the new head hash branchName := prGitBranchNameForPR(req) updateOrCreatePRBranch(h, prjPr.Base.Repo, commitMsg, branchName)