1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2024-11-21 19:42:38 +01:00
Phabricator-maintenance-bot/user_notice_archiver.py
Amir Sarabadani 731184f2be Add user_notice_archiver
To clean up archives of user-notice tag
2022-08-13 16:06:50 +02:00

13 lines
468 B
Python
Executable file

from lib import Client
client = Client.newFromCreds()
user_notice_phid = client.lookupPhid('#user-notice')
columns = client.getColumns(user_notice_phid)
mapping = {}
for column in columns['data']:
mapping[column['fields']['name']] = column['phid']
gen = client.getInactiveTasksWithProject(user_notice_phid, columns=[mapping['Already announced/Archive']])
for phid in gen:
client.changeProjectByPhid(phid, user_notice_phid, 'PHID-PROJ-y6egyt5y4lvnzs5mgll6')