File tree Expand file tree Collapse file tree 4 files changed +37
-37
lines changed Expand file tree Collapse file tree 4 files changed +37
-37
lines changed Original file line number Diff line number Diff line change 11# It will force the user to add an e-mail for this project, before committing.
2- 2+
Original file line number Diff line number Diff line change 3232 VALIDATE_CHECKOV : false
3333 VALIDATE_JSCPD : false
3434 VALIDATE_KOTLIN : false
35+ VALIDATE_JAVASCRIPT_PRETTIER : false
3536 VALIDATE_JSON_PRETTIER : false
3637 VALIDATE_MARKDOWN_PRETTIER : false
3738 VALIDATE_YAML_PRETTIER : false
39+ VALIDATE_BASH_EXEC : false
3840
3941 - name : Set up JDK
4042
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2- import * as ChildProcess from 'node:child_process' ;
3- import * as process from 'node:process' ;
2+ import * as ChildProcess from 'node:child_process'
3+ import * as process from 'node:process'
44
55const checkCommitMail = ( ) => {
6- console . warn ( ` Check COMMIT_MAIL` ) ;
7- if ( ! process . env . COMMIT_MAIL ) {
8- console . error (
9- ` No COMMIT_MAIL set in .env, please take a look at the file '.env.template'`
10- ) ;
11- process . exit ( 1 ) ;
12- }
6+ console . warn ( ' Check COMMIT_MAIL' )
7+ if ( ! process . env . COMMIT_MAIL ) {
8+ console . error (
9+ " No COMMIT_MAIL set in .env, please take a look at the file '.env.template'"
10+ )
11+ process . exit ( 1 )
12+ }
1313
14- const currentMail = ChildProcess . execSync ( 'git config user.email' )
15- . toString ( )
16- . trim ( )
17- . toLowerCase ( ) ;
18- const commitMail = process . env . COMMIT_MAIL . trim ( ) . toLowerCase ( ) ;
19- if ( currentMail !== commitMail ) {
20- console . error (
21- `currentMail: ${ currentMail } !== initialMail: ${ commitMail } `
22- ) ;
23- console . error (
24- `Please set your commit user mail for this project like: 'git config user.email '${ commitMail } ''`
25- ) ;
26- process . exit ( 1 ) ;
27- }
28- } ;
14+ const currentMail = ChildProcess . execSync ( 'git config user.email' )
15+ . toString ( )
16+ . trim ( )
17+ . toLowerCase ( )
18+ const commitMail = process . env . COMMIT_MAIL . trim ( ) . toLowerCase ( )
19+ if ( currentMail !== commitMail ) {
20+ console . error ( `currentMail: ${ currentMail } !== initialMail: ${ commitMail } ` )
21+ console . error (
22+ `Please set your commit user mail for this project like: 'git config user.email '${ commitMail } '`
23+ )
24+ process . exit ( 1 )
25+ }
26+ }
2927
30- checkCommitMail ( ) ;
28+ checkCommitMail ( )
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2- import * as ChildProcess from 'node:child_process' ;
3- import * as process from 'node:process' ;
2+ import * as ChildProcess from 'node:child_process'
3+ import * as process from 'node:process'
44
55const checkValidBranchName = ( ) => {
6- console . warn ( ` Check VALID_BRANCH_NAME` ) ;
6+ console . warn ( ' Check VALID_BRANCH_NAME' )
77
8- const currentBranchName = ChildProcess . execSync ( 'git symbolic-ref --short HEAD' )
9- . toString ( )
10- . trim ( )
8+ const currentBranchName = ChildProcess . execSync ( 'git symbolic-ref --short HEAD' )
9+ . toString ( )
10+ . trim ( )
1111
12- const regex = / ^ ( f e a t u r e | f i x | h o t f i x | r e l e a s e ) \/ .+ $ / g;
13- const found = currentBranchName . match ( regex ) !== null ;
14- process . exit ( found ? 0 : 1 ) ;
15- } ;
12+ const regex = / ^ ( f e a t u r e | f i x | h o t f i x | r e l e a s e ) \/ .+ $ / g
13+ const found = currentBranchName . match ( regex ) !== null
14+ process . exit ( found ? 0 : 1 )
15+ }
1616
17- checkValidBranchName ( ) ;
17+ checkValidBranchName ( )
You can’t perform that action at this time.
0 commit comments