We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ba27ad commit 890da51Copy full SHA for 890da51
src/main.js
@@ -3,6 +3,7 @@ const core = require("@actions/core"),
3
4
const token = core.getInput("github-token", { required: true }),
5
releaseBranch = getBranch("release"),
6
+ releaseBranchRegex = RegExp(getInput("release-regex", null)),
7
devBranch = getBranch("dev"),
8
masterBranch = getBranch("master"),
9
label = getInput("label", "gitflow"),
@@ -26,7 +27,11 @@ function getTarget(head) {
26
27
switch (head) {
28
case releaseBranch: return masterBranch;
29
case masterBranch: return devBranch;
- default: return null;
30
+ default:
31
+ if (releaseBranchRegex && releaseBranchRegex.test(head)) {
32
+ return masterBranch;
33
+ }
34
+ return null;
35
}
36
37
0 commit comments