1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2024-11-13 23:52:38 +01:00
Phabricator-maintenance-bot/user_notice_archiver.py

14 lines
468 B
Python
Raw Normal View History

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')