Skip to content

Commit 571c5fa

Browse files
committed
Log commit hash
1 parent 457e504 commit 571c5fa

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ function run() {
5050
core.warning(`'${branch}' is already up to date with '${baseBranch}', skipping.`);
5151
return;
5252
}
53-
core.info(`Fast-forwarding '${branch}' to '${ref}'...`);
53+
const commitHash = sha.slice(0, 7);
54+
core.info(`Fast-forwarding '${branch}' to '${commitHash}'...`);
5455
yield octokit.rest.git.updateRef(Object.assign(Object.assign({}, repo), { ref: `heads/${branch}`, sha,
5556
force }));
5657
}

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.

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = require('@sumup/foundry/lint-staged')(
22
{ language: 'TypeScript' },
3-
{ '*.ts': () => 'yarn build' },
3+
{ '*.ts': () => ['yarn build', 'git add dist'] },
44
);

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ async function run(): Promise<void> {
1818
return;
1919
}
2020

21-
core.info(`Fast-forwarding '${branch}' to '${ref}'...`);
21+
const commitHash = sha.slice(0, 7);
22+
23+
core.info(`Fast-forwarding '${branch}' to '${commitHash}'...`);
2224

2325
await octokit.rest.git.updateRef({
2426
...repo,

0 commit comments

Comments
 (0)