Skip to content

Commit db30269

Browse files
authored
fix: Abbreviate commit_sha to be the short SHA (actions#502)
1 parent 744db5a commit db30269

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

lib/index.js

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

src/main.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,8 @@ core.info(`Running in ${baseDir}`)
119119
.then(async (data) => {
120120
log(undefined, data)
121121
setOutput('committed', 'true')
122-
setOutput('commit_sha', data.commit)
123-
await git
124-
.revparse(data.commit)
125-
.then((long_sha) => setOutput('commit_long_sha', long_sha))
126-
.catch((err) => core.warning(`Couldn't parse long SHA:\n${err}`))
122+
setOutput('commit_long_sha', data.commit)
123+
setOutput('commit_sha', data.commit.substring(0, 7))
127124
})
128125
.catch((err) => core.setFailed(err))
129126

0 commit comments

Comments
 (0)