Skip to content

Commit

Permalink
Fix sha input
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Oct 31, 2019
1 parent e3af0b2 commit 6739872
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,18 @@ async function run() {
try {
const inputs = {
token: core.getInput("token"),
sha: core.getInput("sha"),
body: core.getInput("body"),
path: core.getInput("path"),
position: core.getInput("position")
};

core.debug(`Inputs: ${inspect(inputs)}`);

const sha = inputs.sha ? inputs.sha : process.env.GITHUB_SHA;
core.debug(`SHA: ${sha}`);

await request(
`POST /repos/${process.env.GITHUB_REPOSITORY}/commits/${process.env.GITHUB_SHA}/comments`,
`POST /repos/${process.env.GITHUB_REPOSITORY}/commits/${sha}/comments`,
{
headers: {
authorization: `token ${inputs.token}`
Expand Down

3 comments on commit 6739872

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a multi-line test comment

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a multi-line test comment

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a multi-line test comment

Please sign in to comment.