mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 07:35:05 -04:00
pluginTools: stalePlugins.js
Outputs a list of pluginnames and email address for maintainers to contact. Useful for me to bump folks to maintain there stuff and stop it getting stale :)
This commit is contained in:
parent
35ae08ca77
commit
b3d7f5d63e
1 changed files with 20 additions and 0 deletions
20
src/bin/plugins/stalePlugins.js
Normal file
20
src/bin/plugins/stalePlugins.js
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// Returns a list of stale plugins and their authors email
|
||||||
|
|
||||||
|
const superagent = require('superagent');
|
||||||
|
const currentTime = new Date();
|
||||||
|
|
||||||
|
(async() => {
|
||||||
|
const res = await superagent.get('https://static.etherpad.org/plugins.full.json');
|
||||||
|
const plugins = JSON.parse(res.text);
|
||||||
|
for (const plugin of Object.keys(plugins)) {
|
||||||
|
const name = plugins[plugin].data.name;
|
||||||
|
const date = new Date(plugins[plugin].time);
|
||||||
|
const diffTime = Math.abs(currentTime - date);
|
||||||
|
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||||
|
if (diffDays > (365*2)) {
|
||||||
|
console.log(`${name}, ${plugins[plugin].data.maintainers[0].email}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})();
|
Loading…
Add table
Add a link
Reference in a new issue