Skip to content

Commit

Permalink
g13-watch: track if deleted draft had a 5-year expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Nov 21, 2023
1 parent 4d9f51c commit 0c2cc40
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions reports/g13-watch/g13-watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ import * as OresUtils from '../OresUtils';
],
"clcategories": [
"Category:Rejected AfC submissions",
"Category:Promising draft articles"
"Category:Promising draft articles",
"Category:All drafts subject to special procedures"
],
"tllimit": "max",
"cllimit": "max"
Expand Down Expand Up @@ -145,13 +146,14 @@ import * as OresUtils from '../OresUtils';
let rejected = categories.includes('Rejected AfC submissions');
let oresBad = oresData?.[pg.title]?.oresBad ?? false;
let oresRating = oresData?.[pg.title]?.oresRating ?? 2;
let special = categories.includes('All drafts subject to special procedures');
return g13db.run(`
REPLACE INTO g13(name, description, excerpt, size, ts, declines, upe, coi, unsourced,
promising, blank, test, draftified, rejected, oresBad, oresRating)
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
promising, blank, test, draftified, rejected, oresBad, oresRating, special)
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
`, [
title, desc, excerpt, size, lastEdited, declines, upe, coi, unsourced,
promising, blank, test, draftified, rejected, oresBad, oresRating
promising, blank, test, draftified, rejected, oresBad, oresRating, special
]).catch(e => {
log(`[E] Error inserting ${pg} into g13 db`);
log(e);
Expand Down Expand Up @@ -277,6 +279,7 @@ import * as OresUtils from '../OresUtils';
if (details.blank) notes.push('blank');
if (details.test) notes.push('test');
if (details.draftified) notes.push('draftified');
if (details.special) notes.push('5-year');

table.addRow([
// details.ts ? new bot.date(details.ts).format('YYYY-MM-DD HH:mm') : '',
Expand Down
2 changes: 2 additions & 0 deletions reports/g13-watch/g13_watch.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ ALTER TABLE g13 ADD COLUMN draftified BIT DEFAULT 0 NOT NULL;
ALTER TABLE g13 ADD COLUMN rejected BIT DEFAULT 0 NOT NULL;
ALTER TABLE g13 ADD COLUMN oresBad BIT DEFAULT 0 NOT NULL;
ALTER TABLE g13 ADD COLUMN oresRating TINYINT UNSIGNED;

ALTER TABLE g13 ADD COLUMN special BIT DEFAULT 0 NOT NULL;

0 comments on commit 0c2cc40

Please sign in to comment.