File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 11function isBranchNameValid ( branchName ) {
22 return (
3- ! ! branchName . match (
4- / ^ ( h o t f i x | f e a t | f i x | c h o r e | d o c s | r e f a c t o r | t e s t | r e v e r t | c i | p e r f | s t y l e | b u i l d | c h a n g e | r e m o v e | p o c | m o b s u c c e s s b o t | d e p e n d a b o t ) \/ ( [ a - z ] [ a - z 0 - 9 . _ - ] * ) $ /
3+ / ^ ( h o t f i x | f e a t | f i x | c h o r e | d o c s | r e f a c t o r | t e s t | r e v e r t | c i | p e r f | s t y l e | b u i l d | c h a n g e | r e m o v e | p o c | m o b s u c c e s s b o t | d e p e n d a b o t ) \/ ( [ a - z ] [ a - z 0 - 9 . _ - ] * ) $ / . test (
4+ branchName
55 ) ||
6- ! ! branchName . match ( / ^ r e v e r t - ( [ 0 - 9 ] + ) - ( [ a - z 0 - 9 _ \- @ . / _ - ] * ) $ / ) ||
7- ! ! branchName . match ( / ^ ( m o b s u c c e s s b o t ) \/ ( [ a - z 0 - 9 _ \- @ . / _ - ] * ) $ / ) ||
8- ! ! branchName . match ( / ^ ( d e p e n d a b o t ) \/ ( [ a - z ] [ a - z A - Z 0 - 9 . / _ - ] * ) $ / ) ||
9- ! ! branchName . match ( / ^ ( r e n o v a t e ) \/ ( [ a - z 0 - 9 _ \- @ . / _ - ] * ) $ / ) ||
10- ! ! branchName . match ( / ^ ( c o p i l o t ) \/ ( [ a - z 0 - 9 _ \- @ . / _ - ] * ) $ / )
6+ / ^ r e v e r t - ( [ 0 - 9 ] + ) - ( [ a - z 0 - 9 _ \- @ . / _ - ] * ) $ / . test ( branchName ) ||
7+ / ^ ( m o b s u c c e s s b o t ) \/ ( [ a - z 0 - 9 _ \- @ . / _ - ] * ) $ / . test ( branchName ) ||
8+ / ^ ( d e p e n d a b o t ) \/ ( [ a - z ] [ a - z A - Z 0 - 9 . / _ - ] * ) $ / . test ( branchName ) ||
9+ / ^ ( r e n o v a t e ) \/ ( [ a - z 0 - 9 _ \- @ . / _ - ] * ) $ / . test ( branchName ) ||
10+ / ^ ( c o p i l o t ) \/ ( [ a - z 0 - 9 _ \- @ . / _ - ] * ) $ / . test ( branchName ) ||
11+ / ^ c r o w d i n \/ u p d a t e - t r a n s l a t i o n s $ / . test ( branchName )
1112 ) ;
1213}
1314
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ describe("branch", () => {
2020 "renovate/configure" ,
2121 "renovate/tanstack-table-monorepo" ,
2222 "renovate/mobsuccess-devops-dlpo-react-client-1.x" ,
23+ "crowdin/update-translations" ,
2324 ] ) ( "Test branch %s should be valid" , ( branch ) => {
2425 expect ( isBranchNameValid ( branch ) ) . toBe ( true ) ;
2526 } ) ;
@@ -42,6 +43,7 @@ describe("branch", () => {
4243 "rework/fooDriveFooterBar" ,
4344 "chore//foo" ,
4445 "revert-change/brevo-emailing" ,
46+ "crowdin/not-update-translations" ,
4547 ] ) ( "Test branch %s should be invalid" , ( branch ) => {
4648 expect ( isBranchNameValid ( branch ) ) . toBe ( false ) ;
4749 } ) ;
You can’t perform that action at this time.
0 commit comments