Skip to content

Commit 0e417fc

Browse files
Print tasks with manifest with no execution field
I think all should have it but possibly not?
1 parent 5ce2f4d commit 0e417fc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/trackNodeMigration.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,30 @@ if (!token) {
99
const issues = await fetchAllPages(token, 'repos/microsoft/azure-pipelines-tasks/issues', { labels: 'node-migration', state: 'all' });
1010
console.log('Found', issues.length, 'Node migration issues');
1111

12+
let errors = 0;
1213
for (const entry of await fs.promises.readdir('../../Tasks', { withFileTypes: true })) {
1314
if (!entry.isDirectory() || entry.name === 'Common') {
1415
continue;
1516
}
1617

1718
const manifest = JSON.parse(await fs.promises.readFile('../../Tasks/' + entry.name + '/task.json'));
19+
if (!manifest.execution) {
20+
console.log(entry.name);
21+
console.log(manifest);
22+
errors++;
23+
continue;
24+
}
25+
1826
const keys = Object.keys(manifest.execution).filter(key => key.startsWith('Node'));
1927
if (keys.length === 0) {
2028
continue;
2129
}
2230

2331
console.log(entry.name, 'uses', keys);
2432
}
33+
34+
if (errors.length > 0) {
35+
console.log(errors.length, 'errors encountered');
36+
}
37+
38+
process.exit(errors);

0 commit comments

Comments
 (0)