Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/z0al/commitlint-bot

[NOT MAINTAINED] use https://github.com/apps/semantic-pull-requests
https://github.com/z0al/commitlint-bot

bot commit-message commitlint github-app probot probot-app

Last synced: about 2 months ago
JSON representation

[NOT MAINTAINED] use https://github.com/apps/semantic-pull-requests

Awesome Lists containing this project

README

        

# commitlint [bot]

[![Travis](https://img.shields.io/travis/z0al/commitlint-bot.svg)](https://travis-ci.org/z0al/commitlint-bot)
[![npm](https://img.shields.io/npm/v/commitlint-bot.svg)](https://www.npmjs.com/package/commitlint-bot)


commitlint logo

> Built with [probot](https://github.com/probot/probot) framework

A GitHub App that runs [commitlint](https://github.com/marionebl/commitlint) against all commits of new or edited pull requests
and sets an appropriate status check.

## Usage

1. Browse to [GitHub Apps - commitlint][apps]
2. Accept the permissions
3. Allow access to repositories

On the next pull request, a status check from `commitlint` will appear:

![status-check-screenshot][]

Problem details will be reported as a comment like this:

![status-comment-screenshot][]

For best results, enable branch protection (in the repository's settings) and require the `commitlint` status check to pass before merging:

![branch-protection-screenshot][]

[apps]: https://github.com/apps/commitlint
[status-check-screenshot]: docs/status.png
[status-comment-screenshot]: docs/comment.png
[branch-protection-screenshot]: docs/setting.png

## What is missing?

We don't currently support custom configuration (i.e. `.commitlint.yml` or `.commitlint.json`), but [we will](https://github.com/z0al/commitlint-bot/issues/1)

## Development

1. Setup the repo:

```shell
git clone https://github.com/z0al/commitlint-bot.git
cd commitlint-bot
npm install
```

2. Create your own [GitHub app][]
3. Store the private key as `private-key.pem` somewhere safe, and point to its location in `.env`
4. Start the app with `APP_ID=1234 npm start` where `1234` is your GitHub app's ID
5. Update your GitHub app's Webhook URL to your localtunnel.me URL

[github app]: https://probot.github.io/docs/development/#configure-a-github-app

## Deployment

See [docs/deploy.md](./docs/deploy.md) for more info.

## Credits

Robot designed by [Freepik](https://www.freepik.com/free-vector/fun-pack-of-robots-avatars_1258314.htm).

Inspired by the awesome work of Tom Vincent in their [validate-commit-msg-bot](https://github.com/tlvince/validate-commit-msg-bot) package.

## Like it?

Give it a star(:star:) :point_up_2:

## License

MIT © [Ahmed T. Ali](https://github.com/z0al)