File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,18 +20,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
2020} ;
2121Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
2222const core = __importStar ( require ( "@actions/core" ) ) ;
23- const git = __importStar ( require ( "@actions/github" ) ) ;
2423const INPUT = 'skipOnCommitMsg' ;
2524async function run ( ) {
2625 try {
2726 core . debug ( 'start working' ) ;
2827 const skipOnCommitMsg = core . getInput ( INPUT ) ;
2928 console . log ( `skip CI on commit message ${ skipOnCommitMsg } ` ) ;
30- const commitMessage = git . context . payload . head_commit . message ;
31- console . log ( 'commit message' , commitMessage ) ;
32- if ( commitMessage . includes ( skipOnCommitMsg ) ) {
33- core . setFailed ( `stopping here, because the commit message contains the provided input <${ skipOnCommitMsg } >` ) ;
34- }
29+ core . setFailed ( `stopping here, because the commit message contains the provided input <${ skipOnCommitMsg } >` ) ;
30+ // const ghToken = core.getInput()
31+ // git.getOctokit()
32+ // console.log(git.context.payload)
33+ // const commitMessage = git.context.payload.comment
34+ // console.log('commit message', commitMessage)
35+ // if (commitMessage.includes(skipOnCommitMsg)) {
36+ // core.setFailed(`stopping here, because the commit message contains the provided input <${skipOnCommitMsg}>`)
37+ // }
3538 }
3639 catch ( error ) {
3740 if ( error instanceof Error ) {
Original file line number Diff line number Diff line change @@ -8,12 +8,15 @@ async function run() {
88 core . debug ( 'start working' )
99 const skipOnCommitMsg = core . getInput ( INPUT )
1010 console . log ( `skip CI on commit message ${ skipOnCommitMsg } ` )
11-
12- const commitMessage = git . context . payload . head_commit . message
13- console . log ( 'commit message' , commitMessage )
14- if ( commitMessage . includes ( skipOnCommitMsg ) ) {
15- core . setFailed ( `stopping here, because the commit message contains the provided input <${ skipOnCommitMsg } >` )
16- }
11+ core . setFailed ( `stopping here, because the commit message contains the provided input <${ skipOnCommitMsg } >` )
12+ // const ghToken = core.getInput()
13+ // git.getOctokit()
14+ // console.log(git.context.payload)
15+ // const commitMessage = git.context.payload.comment
16+ // console.log('commit message', commitMessage)
17+ // if (commitMessage.includes(skipOnCommitMsg)) {
18+ // core.setFailed(`stopping here, because the commit message contains the provided input <${skipOnCommitMsg}>`)
19+ // }
1720 } catch ( error ) {
1821 if ( error instanceof Error ) {
1922 core . setFailed ( error . message )
You can’t perform that action at this time.
0 commit comments