gfas-api 0.2.0

Sync GitHub followings to followers
Documentation

gfas

GitHub Following Auto Synchronization

GitHub Actions Coverage Crates.io Downloads License GitHub repo size GitHub Repo stars GitHub commit activity GitHub contributors

Overview

gfas synchronizes your GitHub followings to your followers. It runs on CLI and can be scheduled automatically with GitHub Actions.

Usage

GitHub Actions

  • Fork this repository.
  • Create a personal access token with the user:follow permission.
  • Create an secret named TOKEN in the repository containing the token value.
  • You are ready to follow back automatically!
  • (Optional) Modify the scheduled time in .github/workflow/sync.yml. By default, it runs at 0 minutes past the hour every 6 hours.
  • (Optional) Maybe you want to trigger the Sync workflow manually to see the effect.

CLI

$ cargo install gfas-cli
$ gfas --help
Sync GitHub followings to followers

Usage: gfas.exe [OPTIONS] --user <USER> --token <TOKEN>

Options:
  -u, --user <USER>    Current user
  -t, --token <TOKEN>  Access token
  -v, --verbose...     Increase logging verbosity
  -q, --quiet...       Decrease logging verbosity
  -h, --help           Print help
  -V, --version        Print version

API

The gfas-api crate exports some GitHub API bindings which can be used to build your application.

$ cargo add gfas-api
use gfas_api::GitHub;

let github = GitHub::with_token("<TOKEN>")?;

github.follow("<USER-TO-FOLLOW>").await?;

Development

Building from Source

$ git clone https://github.com/jwcub/gfas.git
$ cd gfas
$ cargo run -- --help

Pre-commit Hooks

Use pre-commit to manage Git pre-commit hooks:

$ pip install pre-commit
$ pre-commit install

Coverage

Use cargo-tarpaulin to generate coverage results:

$ cargo install cargo-tarpaulin
$ cargo tarpaulin --output-dir coverage --out xml --workspace

License

This project is licensed under the Unlicense.