GitHub Projects provides Export view data
options that export tasks into a tsv
file. Does GitHub support reverse option, that is data import from tsv
file? I'd like to avoid manual work of setting up my project :)
Asked
Active
Viewed 48 times
0

Lukasz Dynowski
- 11,169
- 9
- 81
- 124
1 Answers
0
At the moment of writing this post the answer is No. Workaround was to:
- Create a blueprint file with tasks that I want to create -
blueprint.tsv
- Run a seed script to create new items in project -
project-seed.sh
- Manually edit tasks in GitHub Porject by editing
table view
- usingctrl+c
,ctrl+v
Solution
blueprint.tsv
Title Assignees Status Style Chapter
A Todo 01
B Todo 01
C Todo 01
D Todo 01
E Todo 01
project-seed.sh
#!/usr/bin/env bash
# Install GitHub CLI https://cli.github.com/manual/installation
# Login with `gh auth login`
function create_fields() {
echo "Creting project's fields"
fields=$(head -n1 $2)
for field in $fields; do
echo $field
gh project field-create $1 --owner "@me" --name $field --data-type TEXT
done
}
function create_items() {
echo "Create project items"
titles=$(tail -n +2 $2 | cut -f 1)
for title in $titles; do
echo $title
gh project item-create $1 --owner "@me" --title $title
done
}
# Static values
PROJECT_NO=2
TSV_PATH=~/Code/github/projects/blueprint.tsv
# Execute functions
create_fields $PROJECT_NO $TSV_PATH
create_items $PROJECT_NO $TSV_PATH
manual edit in table view

Lukasz Dynowski
- 11,169
- 9
- 81
- 124