From 9b5507124b4d5a5c760489c0e714ea71a62aaadf Mon Sep 17 00:00:00 2001 From: Daniel Slatkin Date: Thu, 1 Jun 2023 19:33:28 -0700 Subject: [PATCH 1/2] fix README error --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 29e29456..52659ef0 100644 --- a/README.md +++ b/README.md @@ -350,11 +350,11 @@ And then export an async function from your module: ```javascript module.exports = async ({github, context, core}) => { - const {SHA} = process.env + const {GITHUB_SHA} = process.env const commit = await github.rest.repos.getCommit({ owner: context.repo.owner, repo: context.repo.repo, - ref: `${SHA}` + ref: `${GITHUB_SHA}` }) core.exportVariable('author', commit.data.commit.author.email) } From fc0fe14d259c1033a01495bbb3164d1624766496 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 28 Nov 2023 12:44:01 -0800 Subject: [PATCH 2/2] remove unused SHA env var --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 52659ef0..f53c1dc7 100644 --- a/README.md +++ b/README.md @@ -338,8 +338,6 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/github-script@v6 - env: - SHA: '${{env.parentSHA}}' with: script: | const script = require('./path/to/script.js')