Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update readme #2

Merged
merged 1 commit into from
May 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 55 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,69 @@
# semantic-prs
# Semantic PRS

> A GitHub App built with [Probot](https://github.com/probot/probot) that A GitHub app to check that pull request titles following the Conventional Commits spec
> A GitHub app to check that pull requests follow the Conventional Commits spec

## Setup
## Installation

```sh
# Install dependencies
npm install
Install the app from the GitHub Marketplace here: [https://github.com/apps/semantic-prs](https://github.com/apps/semantic-prs)

# Run the bot
npm start
## Configuration

By default, no configuration is necessary. The default behaviour is that only the PR title or at least one commit message needs to follow the [Conventional Commits spec](https://www.conventionalcommits.org/en/v1.0.0/)

This can be changed by creating a `semantic.yml` file in your `.github` directory, with any of the following optional settings:

```yaml
# Enable/disable creation of status checks
enabled: <boolean> # default: true
```

```yaml
# Validate the PR title, and ignore all commit messages
titleOnly: <boolean> # default: false
```

```yaml
# Validate all commit messages, and ignore the PR title
commitsOnly: <boolean> # default: false
```

## Docker
```yaml
# Validate the PR title and all commit messages
titleAndCommits: <boolean> # default: false
```

```sh
# 1. Build container
docker build -t semantic-prs .
```yaml
# If commitsOnly or titleAndCommits is set to true, then only a single commit needs to pass validation instead of every commit
# If neither of those options are set to true then this option is ignored
anyCommit: <boolean> # default: false
```

# 2. Start container
docker run -e APP_ID=<app-id> -e PRIVATE_KEY=<pem-value> semantic-prs
```yaml
types:
- <string>
- <string>
- ...
```

## Contributing
```yaml
scopes:
- <string>
- <string>
- ...
```

If you have suggestions for how semantic-prs could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
```yaml
# Allow merge commits (e.g. 'Merge branch "master" into fix/delete-all-tests')
# If neither of commitsOnly or titleAndCommits is set to true then this option is ignored
allowMergeCommits: <boolean> # default: false
```

For more, check out the [Contributing Guide](CONTRIBUTING.md).
```yaml
# Allow revert commits (e.g. 'Revert "fix: delete all tests"')
# If neither of commitsOnly or titleAndCommits is set to true then this option is ignored
allowRevertCommits: <boolean> # default: false
```

## License
## Credits

[ISC](LICENSE) © 2022 Ben Ezard <ezard.ben@gmail.com>
Heavily based on the [Semantic Pull Requests](https://github.com/zeke/semantic-pull-requests) GitHub App created by [@zeke](https://github.com/zeke)