https://github.com/nextdoor/barrelman
Watch the things that matter to you on Github.
https://github.com/nextdoor/barrelman
Last synced: 11 months ago
JSON representation
Watch the things that matter to you on Github.
- Host: GitHub
- URL: https://github.com/nextdoor/barrelman
- Owner: Nextdoor
- License: apache-2.0
- Created: 2018-08-07T22:29:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-10T23:24:54.000Z (almost 8 years ago)
- Last Synced: 2025-03-17T21:45:21.352Z (over 1 year ago)
- Language: Python
- Size: 135 KB
- Stars: 2
- Watchers: 20
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Barrelman
**Watch the things that matter to you on Github.**

*The Barrelman is stationed in the crow's nest of an oceangoing vessel as a navigational aid. In early ships, the nest was simply a barrel lashed to the tallest mast.*
Create rules for your repo in barrelman.yml and spy on your coworker's PRs. If a rule is triggered, you'll be added as a reviewer, a comment will be made, and Pierre will ping you.

Review other's PRs and watch for things like:
* Importing "that library"
* Calling deprecated function
* Using a bad word and not changing it in placeholder label
## Writing Rules
Barrelman runs Python's regex engine on your rules. A rule consists of a pattern and a list of github usernames or teamnames.
Put rules in a file named **barrelman.yml** in the master branch of the repo. Rules will be checked against newly added changes from the diff of the PR.
````
'hello world':
- dylan
- mary
- team/infra
````
Barrelman supports **regex**. Here are some examples. Check here for Python's regex syntax and remember to escape special characters.
https://docs.python.org/2/library/re.html#regular-expression-syntax
````
# Rule for urls
'https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+':
- wonderwoman
# Rule to match "todo" at beginning and end of word, case insensitive. For ex, "TODOIST" will not match
'\b(?i)TODO\b'
- tchalla
# Rule with newlines
'line1\nline2':
- tonystark
````
Barrelman supports **github teams**. Specify a team by using "team/" in front of the team name.
````
'tooling':
- drake
- kanye
- team/devtools
````
Barrelman will detect if the barrelman.yml file is corrupted on master or if a PR that changes it mucks it up.
If you receive a comment on a PR stating that something is wrong with the file, carefully check the format of the barrelman.yml file of the specified branch.
**Common mistakes:** tabs instead of 4 spaces, no space after dash, missing colon after rule.
If your regex pattern is not getting recognized, try removing the surrounding quotes.