From c398d47a247b02fc0f5a91d64e5293de814bdcfa Mon Sep 17 00:00:00 2001 From: Uku Pattak Date: Thu, 1 Feb 2024 23:41:25 +0200 Subject: [PATCH] Add more logging --- dist/index.js | 2 ++ src/main.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/dist/index.js b/dist/index.js index d86e4b5..18443eb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35913,6 +35913,7 @@ exports.run = void 0; const moment_1 = __importDefault(__nccwpck_require__(9623)); const githubRequests_1 = __nccwpck_require__(2963); const bash_1 = __nccwpck_require__(9134); +const github_1 = __nccwpck_require__(5438); async function run(path) { await (0, bash_1.exec)(`git -C ${path} fetch --depth=50 origin +refs/heads/*:refs/remotes/origin/*`); const commitHash = await (0, bash_1.exec)(`git -C ${path} rev-parse HEAD`); @@ -35922,6 +35923,7 @@ async function run(path) { const submoduleName = await (0, bash_1.exec)(`basename $(git -C ${path} rev-parse --show-toplevel)`); const lastCommit = await getLastCommit(path); const links = await getLinks(path, commitHash, branch); + console.log('Workflow', github_1.context.workflow); await comment(submoduleName, `**Submodule "${submoduleName}" status** - Current branch: **${branch}** diff --git a/src/main.ts b/src/main.ts index 123030b..0023133 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,6 +6,7 @@ import { updatePullRequestComment, } from './githubRequests' import { exec } from './bash' +import { context } from '@actions/github' export async function run(path: string) { await exec(`git -C ${path} fetch --depth=50 origin +refs/heads/*:refs/remotes/origin/*`) @@ -18,6 +19,8 @@ export async function run(path: string) { const lastCommit = await getLastCommit(path) const links = await getLinks(path, commitHash, branch) + console.log('Workflow', context.workflow) + await comment( submoduleName, `**Submodule "${submoduleName}" status**