How to Convert Issue to Epic with ZenHub API

Tadashi Shigeoka ·  Thu, December 3, 2020

I’ll introduce how to convert issues to Epics using the ZenHub API.

ZenHub

Background: Want to Bulk Convert Issues to Epics with ZenHub API

After bulk creating GitHub issues, I wanted to bulk convert issues to Epics using the ZenHub API, which is what this article covers.

Converting Issues to Epics with ZenHub API

Use the ZenHub API POST /p1/repositories/:repo_id/issues/:issue_number/convert_to_epic to convert issues to Epics.

ZENHUB_API_TOKEN_HEADER='X-Authentication-Token: xxxxxx'

curl -X POST \\
-H ${ZENHUB_API_TOKEN_HEADER} \\
-H 'Content-Type: application/json' \\
https://api.zenhub.com/p1/repositories/:repo_id/issues/:issue_number/convert_to_epic \\
-d '{ "issues": []}'

That’s all from the Gemba on bulk converting issues to Epics with the ZenHub API.