mirror of
https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot
synced 2024-11-22 03:52:37 +01:00
731184f2be
To clean up archives of user-notice tag
13 lines
468 B
Python
Executable file
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')
|