This is an automated email from the ASF dual-hosted git repository.

jstastnycz pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-serverless-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 4203ae27 kie-issues#776: automate PR merge into protected branches 
(#462)
4203ae27 is described below

commit 4203ae27b9f4186569a6b172b72c18a84e551531
Author: Jan Stastny <[email protected]>
AuthorDate: Mon May 13 10:50:17 2024 +0200

    kie-issues#776: automate PR merge into protected branches (#462)
    
    Co-authored-by: jstastny-cz <[email protected]>
---
 .ci/jenkins/Jenkinsfile.promote | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote
index 05cd15cd..0583ed31 100644
--- a/.ci/jenkins/Jenkinsfile.promote
+++ b/.ci/jenkins/Jenkinsfile.promote
@@ -80,14 +80,14 @@ pipeline {
             steps {
                 script {
                     dir(helper.getRepoName()) {
-                        helper.checkoutRepo()
 
                         // Merge PR
                         String prLink = 
properties.retrieve("${helper.getRepoName()}.pr.link")
-                        if (prLink) {
+                        if (prLink?.trim()) {
+                            githubscm.approvePR(prLink, 
helper.getGitAuthorCredsId())
                             githubscm.mergePR(prLink, 
helper.getGitAuthorPushCredsId())
-                            githubscm.pushObject('origin', 
helper.getBuildBranch(), helper.getGitAuthorPushCredsId())
                         }
+                        helper.checkoutRepo()
 
                         // Tag api / container-builder
                         helper.createTag("api/${helper.getGitTag()}")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to