diff --git a/.github/workflows/find-inactive-tsc.yml b/.github/workflows/find-inactive-tsc.yml index aacb4d1ed56de5..5d834c8cb25d70 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 acd2cee45b6fb6..362e2ee293922c 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');