Skip to content

Commit 255b066

Browse files
feat(*): next try
1 parent bf70de0 commit 255b066

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

lib/main.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
2020
};
2121
Object.defineProperty(exports, "__esModule", { value: true });
2222
const core = __importStar(require("@actions/core"));
23-
const git = __importStar(require("@actions/github"));
2423
const INPUT = 'skipOnCommitMsg';
2524
async 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) {

src/main.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)