Skip to content

Commit d23b16c

Browse files
committed
build: update dist/ after review suggestions
1 parent c878061 commit d23b16c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

dist/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31949,15 +31949,22 @@ const utils_1 = __nccwpck_require__(3924);
3194931949
const vercel_1 = __nccwpck_require__(3597);
3195031950
const { context } = github;
3195131951
async function getGitCommitMessage() {
31952+
let result;
3195231953
try {
31953-
const { stdout } = await exec.getExecOutput('git', ['log', '-1', '--pretty=format:%B'], { silent: true });
31954-
return stdout.trim();
31954+
result = await exec.getExecOutput('git', ['log', '-1', '--pretty=format:%B'], { silent: true, ignoreReturnCode: true });
3195531955
}
3195631956
catch (error) {
3195731957
const message = error instanceof Error ? error.message : String(error);
3195831958
throw new Error(`Failed to retrieve git commit message: ${message}. `
3195931959
+ 'Ensure this action runs in a git repository with at least one commit.');
3196031960
}
31961+
if (result.exitCode !== 0) {
31962+
const detail = result.stderr.trim()
31963+
|| `git exited with code ${result.exitCode}`;
31964+
throw new Error(`Failed to retrieve git commit message: ${detail}. `
31965+
+ 'Ensure this action runs in a git repository with at least one commit.');
31966+
}
31967+
return result.stdout.trim();
3196131968
}
3196231969
function logContextDebug() {
3196331970
core.debug(`action : ${context.action}`);

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)