summaryrefslogtreecommitdiff
path: root/tools/find-inactive-collaborators.mjs
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2022-01-10 02:14:31 -0800
committerDanielle Adams <adamzdanielle@gmail.com>2022-01-31 23:54:53 -0500
commit70ea7462a6226e9978a89d0d85ec037bc4f7a94a (patch)
tree04dc924f3924af03b0325afc5b256c078bb863d4 /tools/find-inactive-collaborators.mjs
parent00333fe737d85718abfee7d6b931d5775a6809ee (diff)
downloadnode-new-70ea7462a6226e9978a89d0d85ec037bc4f7a94a.tar.gz
tools: use GITHUB_ACTIONS env var in inactivity scripts
Don't rewrite the README if we're not running inside a GitHub Action. PR-URL: https://github.com/nodejs/node/pull/41422 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'tools/find-inactive-collaborators.mjs')
-rwxr-xr-xtools/find-inactive-collaborators.mjs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/find-inactive-collaborators.mjs b/tools/find-inactive-collaborators.mjs
index e01b29ac5f..71a00b970a 100755
--- a/tools/find-inactive-collaborators.mjs
+++ b/tools/find-inactive-collaborators.mjs
@@ -189,8 +189,9 @@ const inactive = collaborators.filter((collaborator) =>
if (inactive.length) {
console.log('\nInactive collaborators:\n');
console.log(inactive.map((entry) => `* ${entry.name}`).join('\n'));
- console.log('\nGenerating new README.md file...');
- const newReadmeText = await moveCollaboratorToEmeritus(inactive);
- fs.writeFileSync(new URL('../README.md', import.meta.url), newReadmeText);
- console.log('Updated README.md generated. Please commit these changes.');
+ if (process.env.GITHUB_ACTIONS) {
+ console.log('\nGenerating new README.md file...');
+ const newReadmeText = await moveCollaboratorToEmeritus(inactive);
+ fs.writeFileSync(new URL('../README.md', import.meta.url), newReadmeText);
+ }
}