Skip to content

Instantly share code, notes, and snippets.

@cyxou
Last active September 3, 2023 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyxou/c8e6762bf976dc2d1bf95b3babaefb03 to your computer and use it in GitHub Desktop.
Save cyxou/c8e6762bf976dc2d1bf95b3babaefb03 to your computer and use it in GitHub Desktop.
How to export issues from Github Project to Yandex Tracker
#!/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