Skip to content

Commit

Permalink
try github.context.payload.pull_request.head.sha
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranayub committed Jul 6, 2020
1 parent abd6598 commit ff96d0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const run = async () => {
const netlifyToken = process.env.NETLIFY_TOKEN;
// In a PR, github.contex.sha refers to the last merge commit SHA
// not the *latest commit* of the PR which is what Netlify uses. Instead,
// have to use github.context.event.pull_request.head.sha
// have to use github.context.payload.pull_request.head.sha
// See: https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#pull_request
const commitSha = github.context.event.pull_request.head.sha;
const commitSha = github.context.payload.pull_request.head.sha;
const MAX_TIMEOUT = Number(core.getInput("max_timeout")) || 60;
const siteName = core.getInput("site_name");
if (!netlifyToken) {
Expand Down

0 comments on commit ff96d0f

Please sign in to comment.