GithubHelp home page GithubHelp logo

jayc13 / slack-pull-reminder-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from christierney/slack-pull-reminder

0.0 0.0 0.0 6 KB

a script to gently remind people about open pull requests

Python 100.00%

slack-pull-reminder-1's Introduction

Script that checks a specified list of GitHub repositories for open pull requests, and sends a reminder to a specified Slack room.

why

We have a large number of developers working on a large number of repositories. The quantity of notifications from GitHub is overwhelming and most people ignore them. There is no 'inbox' where you can find pull requests that need to be reviewed, so devs who are waiting on reviews have to manually nag people.

how

You will need to create a Slack App and get a webhook URL for it.

If you want to access a private repo, you will also need a personal access token: https://github.com/settings/tokens This token should have sufficient scope to read repo information.

options

  • -k, --hook [required]: the webhook URL from the Slack App installation
  • -u, --user: a GitHub username (required if accessing a private repo)
  • -p, --password: a GitHub personal access token (required if accessing a private repo)
  • -d, --domain: the GitHub domain to query (defaults to api.github.com.) Do not include protocol or path components. Example: github.mydomain.com.
  • -c, --color: the sidebar color to use for the room notification.
  • repos [required]: one or more repositories to check for open pull requests. These are positional arguments and must come after all other options. The syntax is <user|org>/<repo>, e.g. github/hubot.

example

Report open pull requests from the github/hubot repo.

remind.py --room=myroom --hook=<slack webhook url> github/hubot

Report open pull requests from myorg/a and myuser/b repos on a GitHub Enterprise server hosted at github.mydomain.com.

remind.py -d github.mydomain.com -k <slack webhook url> myorg/a myuser/b

Suggestion: create a shell script that calls this with your desired arguments, and run it regularly with cron.

caveats

Requires python3. Blows up badly if any API requests fail for any reason.

possible improvements

  • consider reading token from a configuration file
  • allow GitHub credentials for non-public repos or enterprise servers
  • better error handling

slack-pull-reminder-1's People

Contributors

christierney avatar

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.