From 6c5f1668f7436a2da70dc6daacacc8bd384e4a2d Mon Sep 17 00:00:00 2001 From: Vladimir Jimenez Date: Mon, 7 Dec 2020 10:01:29 -0800 Subject: [PATCH 1/2] Fix namespace for `WebhookPayloadPush` --- packages/github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/github/README.md b/packages/github/README.md index 02e9be077d..316ecc23b2 100644 --- a/packages/github/README.md +++ b/packages/github/README.md @@ -69,7 +69,7 @@ import * as core from '@actions/core' import * as github from '@actions/github' import * as Webhooks from '@octokit/webhooks' if (github.context.eventName === 'push') { - const pushPayload = github.context.payload as Webhooks.WebhookPayloadPush + const pushPayload = github.context.payload as Webhooks.EventPayloads.WebhookPayloadPush core.info(`The head commit is: ${pushPayload.head}`) } ``` From 4de2a56e1c544ae5ab43694318b1eaa14e59c49c Mon Sep 17 00:00:00 2001 From: Vladimir Jimenez Date: Mon, 7 Dec 2020 10:09:44 -0800 Subject: [PATCH 2/2] Use `after` in example instead of removed `head` --- packages/github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/github/README.md b/packages/github/README.md index 316ecc23b2..5b9c8c1e40 100644 --- a/packages/github/README.md +++ b/packages/github/README.md @@ -70,7 +70,7 @@ import * as github from '@actions/github' import * as Webhooks from '@octokit/webhooks' if (github.context.eventName === 'push') { const pushPayload = github.context.payload as Webhooks.EventPayloads.WebhookPayloadPush - core.info(`The head commit is: ${pushPayload.head}`) + core.info(`The head commit is: ${pushPayload.after}`) } ```