Skip to content

Commit 185a002

Browse files
authored
feat(branch): allow renovate prefix [FRONT-1897] (#102)
1 parent 95481a3 commit 185a002

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/branch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ function isBranchNameValid(branchName) {
55
) ||
66
!!branchName.match(/^revert-([0-9]+)-([a-z0-9_\-@./_-]*)$/) ||
77
!!branchName.match(/^(mobsuccessbot)\/([a-z0-9_\-@./_-]*)$/) ||
8-
!!branchName.match(/^(dependabot)\/([a-z][a-zA-Z0-9./_-]*)$/)
8+
!!branchName.match(/^(dependabot)\/([a-z][a-zA-Z0-9./_-]*)$/) ||
9+
!!branchName.match(/^(renovate)\/([a-z0-9_\-@./_-]*)$/)
910
);
1011
}
1112

lib/branch.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ describe("branch", () => {
1717
"dependabot/foo",
1818
"dependabot/npm_and_yarn/axios-0.21.1",
1919
"dependabot/npm_and_yarn/axios-0.21.1",
20+
"renovate/configure",
21+
"renovate/tanstack-table-monorepo",
22+
"renovate/mobsuccess-devops-dlpo-react-client-1.x",
2023
])("Test branch %s should be valid", (branch) => {
2124
expect(isBranchNameValid(branch)).toBe(true);
2225
});

0 commit comments

Comments
 (0)