Skip to content

Commit

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

PR-URL: #41472
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
  • Loading branch information
Trott authored Jan 13, 2022
1 parent 25d0fbf commit 4b1ee04
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

1 comment on commit 4b1ee04

@Trott
Copy link
Member Author

@Trott Trott commented on 4b1ee04 Jan 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've blocked the user of the previous hidden/minimized comment.

Please sign in to comment.