mirror of
https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot
synced 2024-11-22 12:02:38 +01:00
Add the part to create parent task
This comes handy in case of creating new wikis.
This commit is contained in:
parent
9ddb439762
commit
b84cf9d064
1 changed files with 21 additions and 0 deletions
21
lib.py
21
lib.py
|
@ -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):
|
def taskDetails(self, phid):
|
||||||
"""Lookup details of a Maniphest task."""
|
"""Lookup details of a Maniphest task."""
|
||||||
r = self.post('maniphest.query', {'phids': [phid]})
|
r = self.post('maniphest.query', {'phids': [phid]})
|
||||||
|
|
Loading…
Reference in a new issue