We use ZenHub with our enterprise GitHub installation. I'm writing a script to move issues from one GitHub repo to another, including the ZenHub info. I've gotten the issues copied, labels and milestones set. I then use the ZenHub API to set estimates and create epics. All that works fine. My final step is to assign the issues to ZenHub pipelines. The following works fine (to get info about an issue):
zenhub_headers = {"X-Authentication-Token": "%s" % zenhub_token}
url = '%s/p1/repositories/%d/issues/15' % (zenhub_endpoint, repo)
response = requests.get(url, headers=zenhub_headers, verify=False)
However, when I attempt to move the same issue to a pipeline with the following:
params = json.dumps({"pipeline_id": "5a36d8584b9b9e57bc9729f9"} )
zenhub_headers = {"X-Authentication-Token": "%s" % zenhub_token}
url = '%s/p1/repositories/%d/issues/15/moves' % (zenhub_endpoint, repo)
response = requests.post(url, headers=zenhub_headers, data=params, verify=False)
I get a 400 with: b'{"message":"Invalid Field for pipeline_id: undefined"}'
. I've verified that pipeline 5a36d8584b9b9e57bc9729f9
does exist in the target repo.
The API is still in a beta state. I'm wondering if this is a bug in the API or something I'm doing wrong.