arjunblj / github-fmt-bot

A simple GitHub bot that'll clean up your messy code and open a PR with the changes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github-fmt-bot

A simple GitHub bot that'll clean up your messy code and open a PR with the changes.

Writing code is hard and formatting is even harder. Thanks to James Long's incredible project prettier, we're one step closer. This is a turn key bot that'll take a GitHub user token, listen to pushes on a specified branch (e.g. master) and open a pull-request enforcing any style violations made in the process.

Right now, it's powered by prettier and runs as a standalone script. In the future, I want to enable eslint option specification and integrate it with CI systems.

Usage

Just install, either with yarn or npm i.

To get an access token, grab it here for the user that will be opening the PR. Also required is an outgoing webhook set up on the repository to clean up.

Locally, you can get up and running with ngrok and by creating a .env (based on .env.template)

v1.0.0 Roadmap

  • Lint code against prettier
  • Open Pull Requests
  • Take in eslint configuration (or auto-detect) to run eslint --fix
  • Easy Cmd+V integration to Travis and other CI system

License

MIT © Arjun Balaji

About

A simple GitHub bot that'll clean up your messy code and open a PR with the changes.


Languages

Language:JavaScript 100.0%