Git-native issue tracking tool
git issue
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445#!/bin/bash
# shellcheck source=/dev/nullsource gh_list_vars.sh
gh_repo_createdAt() { # shellcheck disable=SC2016 gh api graphql -f query=' query($o:String!,$r:String!){ repository(owner:$o,name:$r){ createdAt } }' -F o="$1" -F r="$2" | jq -r '.data.repository.createdAt'}
echo "- repo created at: $(gh_repo_createdAt "$OWNER" "$REPO")"
sqlite3 -box "$DB_FILE" << EOFSELECT MIN(updated_at) AS min_updated_at, MAX(updated_at) AS max_updated_at, COUNT(*) AS row_countFROM issues;EOF
read -p "- Press Y to initialize database $DB_FILE and state file $DB_STATE_FILE ..." ans
if [[ "$ans" != "Y" && "$ans" != "y" ]]; then echo "- Aborted." exit 1fi
cat > "$DB_STATE_FILE" << 'EOF'{ "updated_at_min": "", "updated_at_max": "", "repo_created_at": "", "processing": "false"}EOFecho "- Initialized state file $DB_STATE_FILE."
if [[ -f "$DB_FILE" ]]; then echo "- remove existing database file $DB_FILE ..." rm "$DB_FILE"fi