https://github.com/li-boxuan/regex-checker
GitHub App that checks Pull Request titles using user-defined regular expression
https://github.com/li-boxuan/regex-checker
continuous-integration github github-app probot-app regular-expression
Last synced: 6 months ago
JSON representation
GitHub App that checks Pull Request titles using user-defined regular expression
- Host: GitHub
- URL: https://github.com/li-boxuan/regex-checker
- Owner: li-boxuan
- License: isc
- Created: 2019-01-19T18:08:56.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-26T15:29:27.000Z (about 7 years ago)
- Last Synced: 2025-04-05T09:16:33.746Z (10 months ago)
- Topics: continuous-integration, github, github-app, probot-app, regular-expression
- Language: JavaScript
- Homepage: https://github.com/apps/regex-checker
- Size: 11.5 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Regex Checker
> A GitHub App that checks Pull Request titles with the power of
user-defined regular expression. It is completely free.
Usage demo 1: Prevent certain pattern (regular expression)

Usage demo 2: Require certain pattern (regular expression)

## Quick Start
To use Regex Checker, all you need to do is just as simple as:
1. Go to https://github.com/apps/regex-checker
2. Install it to your repositories
3. Start using it!
4. (Optional) Add config file for advanced features
### Default Feature
By default, Regex Checker checks the title of every pull request and
mark GitHub checks as in progress if any of the following pattern
(case insensitive) is found:
- WIP
- DNM
- Work in Progress
- Do Not Merge
### Advanced Features
Create a `.github/regex-check.yml` in your repository. This will
override default settings.
Example:
```yaml
# mustMatch: a string (natural language or regular expression) that
# the Pull Request title must match.
# leave it empty or comment it if you don't need it.
# You may need to have quotes wrapped around, otherwise it cannot be
# parsed correctly in yaml format.
mustMatch: "^([^:]*|[^:]+[^ ]: [A-Z0-9*].*)$"
# The above will match `README.md: Update` or `Update README`,
# but not `README.md:Update` (missing space after colon) or `README.md: update`
# (shortlog needs to begin with a capital letter)
# If you want the regular expression to match the whole title exactly, use
# ^ at the beginning and $ at the end.
# mustNotMatch: a list of strings that the Pull Request title must NOT contain
# leave it empty or comment it if you don't need it. You can have a mixed list
# of natural terms and regular expressions.
mustNotMatch:
- WIP
- DNM
- "^#" # regular expression that prevents hashtag at the beginning of title
# caseSensitive: whether you want your patterns to be case sensitive or not.
# In case insensitive mode, `WIP` would match `WIP`, `wip`, `Wip`, etc.
# Be careful that this might cause some unexpected match for regular expressions.
caseSensitive: true
# failureStatus: Use `in_progress` or `failure`.
failureStatus: in_progress
```
If you don't know about or are not familiar with regular expression,
[this](https://regexone.com/) is a great resource and tutorial.
You can use [regex101](https://regex101.com) to test your regular expression online.
## Development and Contributing
### Setup on your own server
Regex Checker is based on [Probot](https://probot.github.io/), a free GitHub App framework. It is running on heroku as a service 7x24 hours, so you don't need to
bother installing or deploying it. However, If you do like to develop or deploy
this App on your own server, refer to [Probot Deployment Doc](https://probot.github.io/docs/deployment/).
```sh
# Install dependencies
npm install
# Run the bot
npm start
```
### Contributing
If you have suggestions for how regex-checker could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the [Contributing Guide](CONTRIBUTING.md).
### License
[ISC](LICENSE) © 2019 Boxuan Li