Skip to content

Commit

Permalink
Log commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Oct 12, 2021
1 parent 457e504 commit 571c5fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ function run() {
core.warning(`'${branch}' is already up to date with '${baseBranch}', skipping.`);
return;
}
core.info(`Fast-forwarding '${branch}' to '${ref}'...`);
const commitHash = sha.slice(0, 7);
core.info(`Fast-forwarding '${branch}' to '${commitHash}'...`);
yield octokit.rest.git.updateRef(Object.assign(Object.assign({}, repo), { ref: `heads/${branch}`, sha,
force }));
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = require('@sumup/foundry/lint-staged')(
{ language: 'TypeScript' },
{ '*.ts': () => 'yarn build' },
{ '*.ts': () => ['yarn build', 'git add dist'] },
);
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ async function run(): Promise<void> {
return;
}

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

core.info(`Fast-forwarding '${branch}' to '${commitHash}'...`);

await octokit.rest.git.updateRef({
...repo,
Expand Down

0 comments on commit 571c5fa

Please sign in to comment.