Created
March 9, 2020 21:01
-
-
Save steinbrueckri/f4df4e13f5c9b33bdbdc4607739c2d04 to your computer and use it in GitHub Desktop.
Dirty Trello2Github issues migration script
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
#!/bin/bash | |
### Open your Trello Board in the Brower for example https://trello.com/b/UyF8VyFV/innovation-weekly | |
### Add ".json" add the end of the URL like https://trello.com/b/UyF8VyFV/innovation-weekly.json | |
### Now your browser should display a Json Doc, download this. | |
for row in $(cat innovation-weekly.json | jq -r '.cards[] | { status: .closed, name: .name, desc: .desc} | @base64'); do | |
_jq() { | |
echo ${row} | base64 --decode | jq -r ${1} | tr -d '\n' | |
} | |
if [ "$(_jq '.status')" != "false" ]; then | |
echo "$(_jq '.name') - $(_jq '.desc')" | |
gh issue create -R username/repo -t "$(_jq '.name')" -b "body: $(_jq '.desc')" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment