#!/usr/bin/env bash
set -e
for i in `seq 1 5`;
do
	curl -H "Authorization: token ${REPO_HELPER_TOKEN}" -H "Accept: application/vnd.github.mercy-preview+json" "https://api.github.com/orgs/theorchard/repos?type=private&page=${i}&per_page=100" > "repos.${i}.json"
done
cat repos.*.json | jq -e -r '.[] | [(.topics | join(";")), .name, .html_url, .created_at, .updated_at] | @csv' > repos.csv
