A GitHub Action that analyses a repository to identify stale branches and issues.
- Detects stale branches: Branches with no activity for a configurable period (default: 6 months).
- Detects stale issues: Issues with no updates for a configurable period (default: 6 months).
- Generates a report (
declutter-report.md
) containing all findings. - Runs as a GitHub Action on a schedule or manually.
- Rust (if running locally).
- A GitHub repository with a valid
GITHUB_TOKEN
set in the environment.
Fork or clone the repository into your GitHub account.
Declutter is configured to run as a GitHub Action by default. The configuration is located in .github/workflows/declutter.yml
. It runs every Sunday but can also be triggered manually.
- Install Rust.
- Clone the repository and navigate to its directory.
- Run:
cargo build --release
GITHUB_TOKEN=<your-access-token> GITHUB_REPOSITORY=<owner/repo> ./target/release/declutter
It generates declutter-report.md
, which includes:
- Stale Branches: Branches that have been inactive beyond the threshold.
- Stale Issues: Issues that haven’t been updated within the threshold.
You can change the thresholds for stale branches and issues by modifying these constants in src/main.rs
:
const STALE_BRANCH_THRESHOLD_DAYS: i64 = 180;
const STALE_ISSUE_THRESHOLD_DAYS: i64 = 180;
Contributions are welcome. Feel free to open an issue or submit a pull request if you have questions or suggestions.