From f7f3bc1f734b4ffa8c1edcd7772c50f4bc03e82a Mon Sep 17 00:00:00 2001 From: Ciro Santilli <cirosantilli@proton.me> Date: Wed, 3 Aug 2022 02:01:10 +0000 Subject: [PATCH] get commit --- action.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/action.js b/action.js index d8b547e..765d163 100755 --- a/action.js +++ b/action.js @@ -194,7 +194,14 @@ try { repo: 'news', per_page: 1, }) - console.log('commits: ' + require('util').inspect(commits)) + console.log('commits: ' + require('util').inspect(commits, { depth: null })) + const sha = commits.data[0].sha + const commit = await octokit.rest.repos.getCommit({ + owner: 'duty-machine', + repo: 'news', + ref: sha, + }) + console.log('commit: ' + require('util').inspect(commit, { depth: null })) } catch (error) { core.setFailed(error.message); } -- GitLab