Last active
September 3, 2023 10:43
-
-
Save cyxou/c8e6762bf976dc2d1bf95b3babaefb03 to your computer and use it in GitHub Desktop.
How to export issues from Github Project to Yandex Tracker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# based on the official API: https://cloud.yandex.ru/docs/tracker/concepts/issues/create-issue | |
# Firstly I had to export all the issues from Github Project using this wonderful tool: https://github.com/fiedl/github-project-to-csv | |
# Then I cleaned up rhe resulting csv file a bit and used https://csvjson.com/csv2json to convert csv to json. | |
# Once I had json with all the issues exported I iterate over it creating issiues in Tracker. | |
token="IAM_TOKEN" | |
orgid="YOUR_ORG_ID" | |
jq -c '.[]' project.json | jq -c 'del(.url) | del(.status) | del(.queueId) | del(.queueKey) | .queue.key = "DEV" | .queue.id = 2' | xargs -0 -d $'\n' -I {} curl --location 'https://api.tracker.yandex.net/v2/issues' \ | |
--header "X-Org-Id: $orgid" \ | |
--header 'Content-Type: application/json' \ | |
--header "Authorization: Bearer $token" \ | |
--data {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment