Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.
/ foxdie Public archive

Repository cleaning tool for branches and pull requests

License

Notifications You must be signed in to change notification settings

wayfair-archive/foxdie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

foxdie

A super-fast tool for taking stale branches and push requests and deleting and/or closing them

Test Status

Setup

Make sure the system you're running on has stable Rust installed. Foxdie supports Rust 1.27 and higher. Installing stable Rust is as easy as installing rustup via your command line.

After you've installed Rust, clone this project and navigate to it. Run cargo build --release in the repository root, and you're ready to start running the executable at target/release/foxdie.

Usage

Foxdie functions by leveraging libgit2 to quickly manipulate the contents of a repository. Therefore, in order to use Foxdie you must have the repository you intend to work on cloned and writable.

Deleting stale branches

USAGE:
    foxdie branches [FLAGS] <DIRECTORY> --since <since> --token <token>

FLAGS:
    -D, --delete     Deletes or closes the slate objects under operation. By default, Foxdie will not delete anything
                     without this flag set.
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -s, --since <since>    Date in RFC 3339 format
    -t, --token <token>    Personal access token for use with GitHub or Gitlab. [env: TOKEN]

ARGS:
    <DIRECTORY>    Sets the Git directory to work from.

Closing stale push requests

USAGE:
    foxdie push-requests [FLAGS] <URL> --since <since> --token <token>

FLAGS:
    -D, --delete     Deletes or closes the slate objects under operation. By default, Foxdie will not delete anything
                     without this flag set.
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -s, --since <since>    Date in RFC 3339 format
    -t, --token <token>    Personal access token for use with GitHub or Gitlab. [env: TOKEN]

ARGS:
    <URL>    Sets the URL to a Git repository to work from.

Generate a report of stale branches

USAGE:
    foxdie report [OPTIONS] <DIRECTORY>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -o, --output <output>    Output path for the report.

ARGS:
    <DIRECTORY>    Sets the Git directory to work from.

Contributing

Thank you for wanting to contribute! Getting set up for development of Foxdie should be as simple as running the above setup instructions and setting up a Rust development environment.

Testing

Run cargo test.

Generating Documentation

Run cargo doc --no-deps. If you wish to have Cargo open the documentation after it has finished building, append --open. If you want to build documentation for crates in release mode, append --release.