From 556937ff48d1d9d2b8bda0567e8f583f0d6ba49e Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 31 Jul 2023 10:51:27 +0200 Subject: [PATCH] refs #5901 Bugs solved --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 8a8e177..0fa7bb8 100644 --- a/main.js +++ b/main.js @@ -1,4 +1,4 @@ -require('simple-git'); +const simpleGit = require('simple-git'); const { promisify } = require('util'); // Local path of the git repository @@ -12,9 +12,9 @@ async function main() { try { await git.fetch(['--prune']); let branches = (await gitBranch(['-r', '--merged', 'HEAD'])).all; - const trunkBranches = ["test", "master", "dev"]; + const excludedBranches = ['test', 'master', 'dev']; branches = branches.map((branch) => {return branch.substring(7, branch.length)}); - branches = branches.filter((element) => !trunkBranches.includes(element)); + branches = branches.filter((element) => !excludedBranches.includes(element)); for (let branch of branches) { await gitPush(['origin', '--delete', branch]);