Skip to content

Commit

Permalink
build: fix workflow access to git history
Browse files Browse the repository at this point in the history
Refs: nodejs#41466

PR-URL: nodejs#41472
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
  • Loading branch information
Trott authored and Linkgoron committed Jan 31, 2022
1 parent ddf650e commit 07cbe8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/find-inactive-tsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tools/find-inactive-tsc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 07cbe8f

Please sign in to comment.