1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2024-11-22 12:02:38 +01:00

Tiny clean ups to patch makers

- Make it deduplicate
 - Remove the temp one
This commit is contained in:
Amir Sarabadani 2020-09-08 18:41:16 +02:00
parent 47c00f28ba
commit 9ddb439762

View file

@ -124,21 +124,7 @@ class AnalyticsPatchMaker(GerritBot):
self.project, self.project,
today.strftime("%Y-%m-%d 00:00:00") today.strftime("%Y-%m-%d 00:00:00")
)) ))
projects = list(set(projects))
projects.sort() projects.sort()
with open('static_data/pageview/whitelist/whitelist.tsv', 'w') as f: with open('static_data/pageview/whitelist/whitelist.tsv', 'w') as f:
f.write('\n'.join(projects) + '\n' + '\n'.join(non_projects)) f.write('\n'.join(projects) + '\n' + '\n'.join(non_projects))
class CxPatchMakerTemp(GerritBot):
def __init__(self):
super().__init__(
'mediawiki/services/cxserver',
'Order entries by alphabetical order\n\nThis would make creating automated patches easier\n\nBug: T253439'
)
def changes(self):
with open('config/languages.yaml', 'r') as f:
lines = f.read().split('\n')[:-1]
lines.sort()
with open('config/languages.yaml', 'w') as f:
f.write('\n'.join(lines) + '\n')