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

Add the part to create parent task

This comes handy in case of creating new wikis.
This commit is contained in:
Amir Sarabadani 2020-09-13 05:49:47 +02:00
parent 9ddb439762
commit b84cf9d064

21
lib.py
View file

@ -92,6 +92,27 @@ class Client(object):
}]
})
def createParentTask(self, desc, project_phids, subtask_phid, title):
self.post('maniphest.edit', {
'objectIdentifier': '',
'transactions': [{
'type': 'subtasks.add',
'value': [subtask_phid]
},
{
'type': 'title',
'value': title
},
{
'type': 'description',
'value': desc,
},
{
'type': 'projects.add',
'value': project_phids
}]
})
def taskDetails(self, phid):
"""Lookup details of a Maniphest task."""
r = self.post('maniphest.query', {'phids': [phid]})