Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c91ac20

Browse filesBrowse files
Trotttargos
authored andcommitted
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: #41422 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 60025bd commit c91ac20
Copy full SHA for c91ac20

File tree

Expand file treeCollapse file tree

2 files changed

+12
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-10
lines changed
Open diff view settings
Collapse file

‎tools/find-inactive-collaborators.mjs‎

Copy file name to clipboardExpand all lines: tools/find-inactive-collaborators.mjs
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ const inactive = collaborators.filter((collaborator) =>
189189
if (inactive.length) {
190190
console.log('\nInactive collaborators:\n');
191191
console.log(inactive.map((entry) => `* ${entry.name}`).join('\n'));
192-
console.log('\nGenerating new README.md file...');
193-
const newReadmeText = await moveCollaboratorToEmeritus(inactive);
194-
fs.writeFileSync(new URL('../README.md', import.meta.url), newReadmeText);
195-
console.log('Updated README.md generated. Please commit these changes.');
192+
if (process.env.GITHUB_ACTIONS) {
193+
console.log('\nGenerating new README.md file...');
194+
const newReadmeText = await moveCollaboratorToEmeritus(inactive);
195+
fs.writeFileSync(new URL('../README.md', import.meta.url), newReadmeText);
196+
}
196197
}
Collapse file

‎tools/find-inactive-tsc.mjs‎

Copy file name to clipboardExpand all lines: tools/find-inactive-tsc.mjs
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,11 @@ if (inactive.length) {
260260
});
261261
console.log(`DETAILS_FOR_COMMIT_BODY=${commitDetails.join(' ')}`);
262262

263-
// Using console.warn() to avoid messing with find-inactive-tsc which consumes
264-
// stdout.
265-
console.warn('Generating new README.md file...');
266-
const newReadmeText = await moveTscToEmeritus(inactive);
267-
fs.writeFileSync(new URL('../README.md', import.meta.url), newReadmeText);
268-
console.warn('Updated README.md generated. Please commit these changes.');
263+
if (process.env.GITHUB_ACTIONS) {
264+
// Using console.warn() to avoid messing with find-inactive-tsc which
265+
// consumes stdout.
266+
console.warn('Generating new README.md file...');
267+
const newReadmeText = await moveTscToEmeritus(inactive);
268+
fs.writeFileSync(new URL('../README.md', import.meta.url), newReadmeText);
269+
}
269270
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.