This is a Github pull request feed that integrates with Slack. It aims to automate some of the things we do in the code review process (e.g., manual reposting) and improve the visibility of outstanding pull requests.
Features include:
- A list of outstanding, open PRs
- Post PRs to various Slack channels (i.e., organize by teams)
- API available listing a PR (i.e., write a script to list a PR on PRFeed)
You will need to configure Octokit
, Warden::GitHub::Rails
, and Slack
.
-
Octokit
requires anaccess_token
with repo access in order to read pull request data from Github. Make sure theaccess_token
belongs to an account that has access to repositories you want integrated. Thesecrets.yml
file will read the value of the access token fromENV["GITHUB_TOKEN"]
. -
Warden::GitHub::Rails
provides authentication so that only members of your Github organization can access the PRFeed. It requires agithub_organization
,client_id
andclient_secret
- procure these from creating an OAuth application in you Github settings. Thesecrets.yml
file will read the value of the ID and secret fromENV["GITHUB_ORG"]
,ENV["GITHUB_CLIENT_ID"]
and ENV["GITHUB_CLIENT_SECRET"]. -
Slack
requires aslack_api_token
to post in channels of your Slack account. Be sure to invite the bot to the various channels.
bundle install
yarn
rake db:setup
rails server
- Click the
Manage teams
by the teams dropdown - Add team name
- Add Slack channel for code-reviews (optional)
- Press
enter
- Choose your team in the teams dropdown
- Paste URL in the input field
- Press
enter
- Press
bump
. Bumping will repost in Slack and will look something like this:
- PR status updates will happen automatically:
Pending
= there are no comments, approvals, or changes requestedCommented
= there are commentsChanges Requested
= changes have been requestedApproved
= an approval has been granted- PRs will disappear from the feed when they've been merged or closed
- Dismissed or stale reviews will revert the status of the PR to the previous state:
Pending
,Commented
, orChanges Requested
- Toggle the button below the input to show all or show only unapproved PRs
bundle exec rspec
Some tests are also run with:
rake test