From 17498e14c2dad7765322fb2a73a4b6b5711eb961 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Thu, 24 Nov 2022 18:24:42 +0200 Subject: [PATCH] chore(backport): action failing due to upstream bug (#1446) (cherry picked from commit 66cec8b7310f3e900856387c8ac65d8df837a005) Signed-off-by: Eli Polonsky # Conflicts: # .projen/tasks.json --- .projen/tasks.json | 8 ++++---- .projenrc.ts | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.projen/tasks.json b/.projen/tasks.json index 6344264a1..5e790e823 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -17,7 +17,7 @@ "exec": "cp .backportrc.json /tmp/.backport/" }, { - "exec": "npx backport --accesstoken ${GITHUB_TOKEN} --pr ${BACKPORT_PR_NUMBER} --non-interactive", + "exec": "npx backport@8.5.0 --accesstoken ${GITHUB_TOKEN} --pr ${BACKPORT_PR_NUMBER} --non-interactive", "cwd": "/tmp/.backport/" } ] @@ -39,7 +39,7 @@ "exec": "cp .backportrc.json /tmp/.backport/" }, { - "exec": "npx backport --accesstoken ${GITHUB_TOKEN} --pr ${BACKPORT_PR_NUMBER} --branch k8s-22/main", + "exec": "npx backport@8.5.0 --accesstoken ${GITHUB_TOKEN} --pr ${BACKPORT_PR_NUMBER} --branch k8s-22/main", "cwd": "/tmp/.backport/" } ] @@ -61,7 +61,7 @@ "exec": "cp .backportrc.json /tmp/.backport/" }, { - "exec": "npx backport --accesstoken ${GITHUB_TOKEN} --pr ${BACKPORT_PR_NUMBER} --branch k8s-23/main", + "exec": "npx backport@8.5.0 --accesstoken ${GITHUB_TOKEN} --pr ${BACKPORT_PR_NUMBER} --branch k8s-23/main", "cwd": "/tmp/.backport/" } ] @@ -83,7 +83,7 @@ "exec": "cp .backportrc.json /tmp/.backport/" }, { - "exec": "npx backport --accesstoken ${GITHUB_TOKEN} --pr ${BACKPORT_PR_NUMBER} --branch k8s-24/main", + "exec": "npx backport@8.5.0 --accesstoken ${GITHUB_TOKEN} --pr ${BACKPORT_PR_NUMBER} --branch k8s-24/main", "cwd": "/tmp/.backport/" } ] diff --git a/.projenrc.ts b/.projenrc.ts index b18527374..d996c0c04 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -199,7 +199,10 @@ function createBackportTask(branch?: Number): Task { task.exec(`mkdir -p ${backportHome}`); task.exec(`cp ${backportConfig.path} ${backportHome}`); - const backport = ['npx', 'backport', '--accesstoken', '${GITHUB_TOKEN}', '--pr', '${BACKPORT_PR_NUMBER}']; + // pinning because of https://github.com/sqren/backport/issues/451 + const backportVersion = '8.5.0'; + + const backport = ['npx', `backport@${backportVersion}`, '--accesstoken', '${GITHUB_TOKEN}', '--pr', '${BACKPORT_PR_NUMBER}']; if (branch) { backport.push(...['--branch', `k8s-${branch}/main`]); } else {