diff --git a/scripts/plugin-directory-audit.js b/scripts/plugin-directory-audit.js index ce67036010..b0dbeeafee 100644 --- a/scripts/plugin-directory-audit.js +++ b/scripts/plugin-directory-audit.js @@ -76,8 +76,17 @@ async function main(args) { let newStatus = pluginDataYaml.status; let statusChanged = false; + // If age < 365 and status is inactive or archived, change to active + if ( + age < 365 && + (pluginDataYaml.status === 'inactive' || + pluginDataYaml.status === 'archived') + ) { + newStatus = 'active'; + statusChanged = true; + } // If status is inactive, change to archived - if (pluginDataYaml.status === 'inactive') { + else if (pluginDataYaml.status === 'inactive') { newStatus = 'archived'; statusChanged = true; }