Skip to content

Commit f4b8b04

Browse files
feat(*): next try
1 parent a6c6720 commit f4b8b04

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ async function run() {
4444
let sha = '';
4545
switch (eventName) {
4646
case 'pull_request':
47-
core.info(JSON.stringify(github.context.payload.pull_request));
4847
sha = github.context.payload.pull_request?.head.sha ?? `unknown`;
4948
break;
5049
case 'push':
@@ -58,6 +57,9 @@ async function run() {
5857
const url = `https://api.github.com/repos/${github.context.payload.repository?.full_name}/git/commits/${sha}`;
5958
core.info(`fetch commit with url: ${url}`);
6059
const commit = (await fetch(url, ghToken)); /* and others */
60+
core.startGroup('commit');
61+
core.info(JSON.stringify(commit, undefined, 2));
62+
core.endGroup();
6163
const commitMessage = commit.message;
6264
core.info(`commit message to check against "${commitMessage}"`);
6365
if (commitMessage.includes(skipOnCommitMsg)) {

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ async function run() {
2323
let sha = ''
2424
switch (eventName) {
2525
case 'pull_request':
26-
core.info(JSON.stringify(github.context.payload.pull_request))
2726
sha = github.context.payload.pull_request?.head.sha ?? `unknown`
2827
break
2928
case 'push':
@@ -38,6 +37,9 @@ async function run() {
3837
const url = `https://api.github.com/repos/${github.context.payload.repository?.full_name}/git/commits/${sha}`
3938
core.info(`fetch commit with url: ${url}`)
4039
const commit = (await fetch(url, ghToken)) as { message: string } /* and others */
40+
core.startGroup('commit')
41+
core.info(JSON.stringify(commit, undefined, 2))
42+
core.endGroup()
4143

4244
const commitMessage = commit.message
4345
core.info(`commit message to check against "${commitMessage}"`)

0 commit comments

Comments
 (0)