tools: change commit fetch limiting in find-inactive-collaborators

GitHub Action workflows can be told to clone a certain number of commits
or else everything. Change find-inactive-collaborators to take a number
of commits to examine rather than a date range so that the parameter can
be used in GitHub Actions.

PR-URL: https://github.com/nodejs/node/pull/39362
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Rich Trott committed 2021-07-14 04:35:00 -07:00
1 parent 4292264c51
commit 1bb660e2e0
2 files changed
+21 -14

No files matched your search

@@ -7,6 +7,10 @@ on:
workflow_dispatch:
env:
NODE_VERSION: 16.x
NUM_COMMITS: 5000
jobs:
find:
@@ -14,11 +18,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install Node.js
with:
fetch-depth: ${{ env.NUM_COMMITS }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: 16.x
node-version: ${{ env.NODE_VERSION }}
- name: Find inactive collaborators
run: tools/find-inactive-collaborators.mjs '1 year ago'
run: tools/find-inactive-collaborators.mjs ${{ env.NUM_COMMITS }}