Supported regex in ignored branches, and added release/

This commit is contained in:
Auto Rebase
2025-01-16 22:05:43 +01:00
parent 2150673d22
commit 8485e19ccd
3 changed files with 6 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ author: Skydust
inputs: inputs:
branchesToIgnore: branchesToIgnore:
description: Comma separated branches to ignore description: Comma separated branches to ignore
default: "dev,main,master" default: "dev,main,master,release/.+"
required: false required: false
mainBranch: mainBranch:
description: "The main branch to rebase on" description: "The main branch to rebase on"

5
app.ts
View File

@@ -61,7 +61,10 @@ const fetchBranches = async (): Promise<string[]> => {
return branches return branches
.split("\n") .split("\n")
.map((branch) => branch.trim()) .map((branch) => branch.trim())
.filter((branch) => !IGNORED_BRANCHES.includes(branch.replace("origin/", "")) && branch !== ""); .filter((branch) => branch !== ""
&& !IGNORED_BRANCHES
.some(ignored => new RegExp(`^${ ignored }$`)
.test(branch.replace("origin/", ""))));
} }
// Get the full commit history for a branch // Get the full commit history for a branch

2
dist/app.js vendored

File diff suppressed because one or more lines are too long