Reddit bot that suggests adding a license file to Github repos that are submitted to Reddit without a license
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.env.example
.gitignore
Cargo.lock
Cargo.toml
LICENSE-APACHE.txt
LICENSE-MIT.txt
README.md

README.md

License Bot

License bot adds a comment to Reddit submissions that link to any Github repository which doesn't contain a license file.

Setup

Create a .env file in the root project directory, based off of the .env.example file.

// Required on OSX >=10.11

brew install openssl

export OPENSSL_INCLUDE_DIR="$(brew --prefix openssl)/include"
export OPENSSL_LIB_DIR="$(brew --prefix openssl)/lib"

cargo build

Run

Local
// First be sure to complete the setup above

cargo run 
Heroku
  1. Create a new Heroku app
  2. Install the Heroku Scheduler add-on
  3. Add Heroku as a git remote heroku git:remote -a license-bot
  4. Tell Heroku to use the Rust buildpack heroku buildpacks:set https://github.com/emk/heroku-buildpack-rust.git
  5. Push to the Heroku repo git push heroku master
  6. Setup the environment variables on Heroku
  7. Setup the heroku scheduler to run ./target/release/license-bot
  8. Test run the bot with heroku run ./target/release/license-bot

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.