diff options
author | Rich Trott <rtrott@gmail.com> | 2022-01-13 07:08:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 15:08:44 +0000 |
commit | 4b1ee041538987223311be5d818a4e3441aa9eed (patch) | |
tree | 88211cf369ffbfe9b8e6e60c7e610fcadd1c0d1c | |
parent | 25d0fbf12e7054cbfd600246b15ee3e8fa448f99 (diff) | |
download | node-new-4b1ee041538987223311be5d818a4e3441aa9eed.tar.gz |
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>
-rw-r--r-- | .github/workflows/find-inactive-tsc.yml | 1 | ||||
-rwxr-xr-x | tools/find-inactive-tsc.mjs | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/.github/workflows/find-inactive-tsc.yml b/.github/workflows/find-inactive-tsc.yml index aacb4d1ed5..5d834c8cb2 100644 --- a/.github/workflows/find-inactive-tsc.yml +++ b/.github/workflows/find-inactive-tsc.yml @@ -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 diff --git a/tools/find-inactive-tsc.mjs b/tools/find-inactive-tsc.mjs index acd2cee45b..362e2ee293 100755 --- a/tools/find-inactive-tsc.mjs +++ b/tools/find-inactive-tsc.mjs @@ -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'); |