Skip to content

Commit

Permalink
Add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ukupat committed Feb 1, 2024
1 parent 9ba0dcd commit c398d47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand All @@ -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}**
Expand Down
3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/*`)
Expand All @@ -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**
Expand Down

0 comments on commit c398d47

Please sign in to comment.