gfas
gfas (GitHub Following Auto Synchronization) manipulates your GitHub following list to match your followers, enabling you to follow back and unfollow back automatically. It runs on CLI and can be scheduled with GitHub Actions.
Usage
GitHub Actions
- Copy-paste the
Sync
workflow to any of your repositories. You can just fork this repository for convenience.
- Don't forget to enable GitHub Actions and the Sync workflow in your fork.
- Create a
personal access token
with both read and write access for permission
Block another userandFollowers.- Block permission is necessary because one can still follow even after blocking us, in which case we are not able to follow back. We just do a quick block-and-unblock to get rid of those zombie follows.
- Create an
secret
named
TOKENin the repository containing the token value. - Customize your workflow, e.g. modify the scheduled time (defaults to daily at midnight).
- Maybe you want to trigger it manually to see the effect.
CLI
Archives of precompiled binaries for gfas are available for Windows, macOS and Linux. Linux and Windows binaries are static executables. Users of platforms not explicitly mentioned below are advised to download one of these archives.
If you're a Rust programmer, gfas can be installed with cargo.
Note that the minimum supported version of Rust for gfas is 1.85.0,
although gfas may work with older versions.
$ cargo install gfas
Alternatively, one can use cargo binstall to install a gfas
binary directly from GitHub:
$ cargo binstall gfas
After installation, run gfas --help for all commands and options.
API
The gfas-api crate exports some GitHub API bindings which can be used to build your application.
use GitHub;
let github = new?;
let followers = github.list_followers.await?;
Building
gfas is written in Rust, so you'll need to grab a Rust installation in order to compile it. gfas compiles with Rust 1.85.0 (stable) or newer. In general, gfas tracks the latest stable release of the Rust compiler.
To build gfas:
Running tests
gfas is relatively well-tested, including both unit tests and integration tests. To run the full test suite, use:
$ cargo test
from the repository root.
Contributing
See CONTRIBUTING.md.
License
This project is licensed under the Unlicense.