Giter VIP home page Giter VIP logo

seal's Introduction

Seal

Build Status

##What is it?

A Slack bot forked from binaryberry that checks GitHub once a day on weekdays for open pull requests across all repos belonging to a GitHub organization, and posts them to language-specific Slack channels, such as #ruby-pull-requests. Notifications for individual repos can also be configured.

The goal is to encourage people to review pull requests in a timely manner, and by organizing the notifications into language-specific channels, it makes it easier and less noisy to view pull requests that align with your expertise.

image image

##How to use it?

Main configuration

Create a YAML file named after your GitHub organization, and place it in the config folder. For example, config/18f.yml. Create entries for each language, and specify the Slack channel the bot should post to. For example:

ruby:
  channel: '#ruby-pull-requests'
  language: 'ruby'

python:
  channel: '#python-pull-requests'
  language: 'python'

In addition to language-based entries, you can also specify a specific repo. For example, if a team that works on awesome_repo wants to integrate Seal into their Slack channel, they would add the following to the YAML file:

awesome-repo:
  channel: '#channel-for-awesome-repo'
  repo: 'awesome-repo'

Customization

Modify config/global.yml to suit your needs. You can ignore pull requests whose title or labels contain certain strings, such as WIP. You can also ignore entire repos. For example:

exclude_titles:
  - 'WIP'
  - '[WIP]'

exclude_labels:
  - 'wip'

ignored_repos:
  - 'C2'

Environment variables

Configure the required environment variables. To test the bot locally, you can set the variables by running the following commands in your Terminal:

export SEAL_ORGANISATION="your_github_organisation"
export GITHUB_TOKEN="your_github_token_from_your_github_settings"
export SLACK_WEBHOOK="your_incoming_webhook_link_for_your_slack_group_channel"

Emojis

Set up the following custom emojis in Slack:

  • :informative_seal:
  • :angrier_seal:
  • :seal_of_approval:
  • :happyseal:

You can use the images in images/emoji/Everyday images that have the corresponding names.

Test the bot

To test the script locally, go to Slack and create a channel or private group called #seal-bot-test. Then run ./bin/seal.rb from your command line. You should see a post in the #seal-bot-test channel.

When that works, you can push the app to Heroku, add the GITHUB_TOKEN and SLACK_WEBHOOK environment variables to Heroku, and use the Heroku scheduler add-on to run Seal at the same time every day, for example at 9:30 every morning (the Seal won't post on weekends).

Deploy to Heroku

Deploy

##How to run the tests? Run rspec in the command line

Credits

The 18F Seal Slackbot is based on and inspired by Tatiana Soukiassian's Seal Slackbot.

Public domain

Tatiana Soukiassian's original work remains covered under an MIT License.

18F's work on this project is in the worldwide public domain, as are contributions to our project. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

seal's People

Contributors

afeld avatar benlovell avatar binaryberry avatar edds avatar elliotcm avatar issyl0 avatar jackscotti avatar jgrevich avatar johnsyweb avatar matthewford avatar monfresh avatar rosa-fox avatar sihugh avatar stig avatar tijmenb avatar tommyp avatar zachmargolis-gov avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zachmargolis

seal's Issues

Specify repo in Welcome message

Some teams have designated one Slack channel to receive Seal messages about several repos. To make it easier to see which repo Seal is talking about, it would be better to include the repo name in the introductory message.

Include # of changes in Slack posts

Knowing # changes per PR is pretty important in terms of deciding whether or not to review a PR at a given moment.

When I look at the long list it is intimidating but I would be likely to pluck off small ones.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.