Skip to content

Commit 6739872

Browse files
committed
Fix sha input
1 parent e3af0b2 commit 6739872

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dist/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,15 +384,18 @@ async function run() {
384384
try {
385385
const inputs = {
386386
token: core.getInput("token"),
387+
sha: core.getInput("sha"),
387388
body: core.getInput("body"),
388389
path: core.getInput("path"),
389390
position: core.getInput("position")
390391
};
391-
392392
core.debug(`Inputs: ${inspect(inputs)}`);
393393

394+
const sha = inputs.sha ? inputs.sha : process.env.GITHUB_SHA;
395+
core.debug(`SHA: ${sha}`);
396+
394397
await request(
395-
`POST /repos/${process.env.GITHUB_REPOSITORY}/commits/${process.env.GITHUB_SHA}/comments`,
398+
`POST /repos/${process.env.GITHUB_REPOSITORY}/commits/${sha}/comments`,
396399
{
397400
headers: {
398401
authorization: `token ${inputs.token}`

0 commit comments

Comments
 (0)