Skip to content

Commit

Permalink
feat(branch): allow renovate prefix [FRONT-1897]
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlienard committed Nov 12, 2024
1 parent 95481a3 commit 369ab04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ function isBranchNameValid(branchName) {
) ||
!!branchName.match(/^revert-([0-9]+)-([a-z0-9_\-@./_-]*)$/) ||
!!branchName.match(/^(mobsuccessbot)\/([a-z0-9_\-@./_-]*)$/) ||
!!branchName.match(/^(dependabot)\/([a-z][a-zA-Z0-9./_-]*)$/)
!!branchName.match(/^(dependabot)\/([a-z][a-zA-Z0-9./_-]*)$/) ||
!!branchName.match(/^(renovate)\/([a-z0-9_\-@./_-]*)$/)
);
}

Expand Down
3 changes: 3 additions & 0 deletions lib/branch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ describe("branch", () => {
"dependabot/foo",
"dependabot/npm_and_yarn/axios-0.21.1",
"dependabot/npm_and_yarn/axios-0.21.1",
"renovate/configure",
"renovate/tanstack-table-monorepo",
"renovate/mobsuccess-devops-dlpo-react-client-1.x",
])("Test branch %s should be valid", (branch) => {
expect(isBranchNameValid(branch)).toBe(true);
});
Expand Down

0 comments on commit 369ab04

Please sign in to comment.