build: fix workflow access to git history

Refs: https://github.com/nodejs/node/pull/41466

PR-URL: https://github.com/nodejs/node/pull/41472
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
This commit is contained in:
Rich Trott authored and GitHub committed 2022-01-13 15:08:44 +00:00
1 parent 25d0fbf12e
commit 4b1ee04153
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -19,6 +19,7 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Clone nodejs/TSC repository
+2 -1
View File
@@ -211,7 +211,8 @@ async function moveTscToEmeritus(peopleToMove) {
// only been on the TSC for a week and therefore hasn't attended any meetings.
const tscMembersAtEnd = await getTscFromReadme();
await runGitCommand(`git checkout 'HEAD@{${SINCE}}' -- README.md`);
const startCommit = await runGitCommand(`git rev-list -1 --before '${SINCE}' HEAD`);
await runGitCommand(`git checkout ${startCommit} -- README.md`);
const tscMembersAtStart = await getTscFromReadme();
await runGitCommand('git reset HEAD README.md');
await runGitCommand('git checkout -- README.md');