A node script that pulls together all pull requests for a team, and builds a slack message from them to let each team member know which pull requests they are responsible for, and what there role is for the pr depending on labels.
The repo has a githubConfig
file, which requires you to have environment variables of
GITHUB_ACCESS_TOKEN
GITHUB_OWNER
, and GITHUB_REPO
to indicate where the pull requests should
be fetched from.
Additionally, in order to communicate with Slack you must set another environment variable of
SLACK_WEBHOOK_URL
. To get this url, set up an Incoming Webhook in Slack.
In order for Mr. Probot to organize your pull requests properly, you apply certain labels to your prs:
PRS1 - in progress
- given to the author; this PR is being worked onPRS2 - ready for review
- given to any assignees that are not the author, or marked as "Unknown"; the PR needs review- Note: While GitHub has a "Reviewer" function, we found the use of "Assignee" to denote the person(s) responsible for whether or not a pr ships as the more reliable designation, since any user who comments on a pull request is automatically marked as a "Reviewer"
PRS3 - in review
- given to any assignees that are not the author; the PR is in the review cyclewaiting on author
- given to the author; this supercedesPRS3 - in review
, code fixes are requiredPRS4 - ready to merge
- given to the author; the PR has passed review and is ready to be merged and deployed
The message sent to slack might look something like this:
- "Deploy to Heroku" button
- Listen to GitHub hooks and direct message individuals when their responsibility changes
- Generalize label requirements
- Convert githubAPI to use new GitHub GraphQL API