refs #5901 Bugs solved

This commit is contained in:
Guillermo Bonet 2023-07-31 10:51:27 +02:00
parent 66192f2505
commit 556937ff48
1 changed files with 3 additions and 3 deletions

View File

@ -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]);