Add GraphQL queries in docs
Add info for build caching
Reduce CI time
This tool will migrate all issues from a github repository (private or public) to a Sourcehut todo.sr.ht ticket tracker.
You need a Github personal access token (create one here).
Note about scopes of the Github access token for this client:
repo
checkbox
You need a Sourcehut personal access token (create one from here).
Note about scopes of the Sourcehut access token:
todo.sr.ht
should have the following scopes: PROFILE,TRACKERS,TICKETS,ACLS,EVENTS,SUBSCRIPTIONS
From sources:
git clone --single-branch --depth=1 https://git.sr.ht/~jman/github-migrate-tool
cd github-migrate-tool
cargo build [ --release ]
Two options:
openssl
:
RUSTFLAGS='-C target-feature=+crt-static' cross build [ --release ]
sudo apt install musl
rustup target install x86_64-unknown-linux-musl
cargo build --target x86_64-unknown-linux-musl [ --release ]
Before starting the migration, you might want to temporarily disable notifications on the destination issue tracker (which by default sends an email for every new ticket).
For big migrations, consider using the import tracker dump function of todo.sr.ht.
cargo run -- -n <repo_name> -o <repo_owner> -t <srht_tracker_id>
# Example:
export GITHUB_TOKEN=xxx
export SRHT_TOKEN=yyy
cargo run -- -n Hello-World -o octocat -t 1234
-l / --only-labels
: Only migrate labels from the Github repository-n / --gh-repo-name <GH_REPO_NAME>
: Github name repository (can also be private)-o / --gh-repo-owner <GH_REPO_OWNER>
: Github owner repository (can also be an organization)-s / --strip-authors
: strip original authors from issues and comments and replace them with the Github @ghost
user.-t / --tracker-id <TRACKER_ID>
: Destination tracker of todo.sr.ht. Tracker must be existing.-v / --verbose
: verbose outputNotes:
Run cargo test
and cargo insta test
.
GraphQL Github explorer: https://docs.github.com/en/graphql/overview/explorer or use Insomnia.
Reference: https://docs.github.com/en/graphql/reference/queries
GraphQL documentation: https://graphql.org/learn/schema/#type-system
Github GraphQL schema and endpoint.
todo.sr.ht GraphQL schema and endpoint.
To test the GraphQL APIs of both services, you can use the Insomnia client: download it from here. Being an Electron application, on Wayland run it with:
./insomnia --enable-features=UseOzonePlatform --ozone-platform=wayland --incognito