GithubHelp home page GithubHelp logo

gharry's Introduction

๐ŸŽ  Gharry

Gharry is a GitHub email notification resender optimized for my daily work.

What I am doing

  1. Configure GitHub to send notificaition emails to Slack's muted channel.
  2. Run Gharry which scans email notifications via Slack API periodically.
  3. Filter, parse and re-send notifications to Slack's unmuted channel.
GitHub -[email]-> Slack -[Gharry]-> Slack

Why???

  • Implementing my own notifier allows me to customize its behavior completely for my work. For example,
    • I want to unsubscribe some notifications automatically.
    • I want to change a notification level (presence or absense of @mention) per notification.
  • I wanted to write something in Rust for the first time in a while.

Implementation

  • Do simple polling instead of event driven approach.
    • I don't have a permission to install webhooks to my organization.
    • The GitHub's notifications API cannot be used since it ignores review state changes.
  • Do everything in a single thread with blocking. No asynchronous IO.
    • This is enough for this program.

Screenshot

A sample image of notifications from facebook/react when I'm watching the repository:

Slack screenshot

Usage

  1. Slack setup

    • Create a bot to use Slack API.
    • Create two channels.
    • Configure email app and get an email address.
  2. GitHub setup

    • Configure to send notifications to the email address created by Slack.
    • Generate an access token (scope: repo, notifications).
  3. Gharry configuration

    • Put a config file in ~/.gharry/config.toml.
    slack_oauth_bot_token = "..."
    slack_mail_channel_id = "..."
    slack_dest_channel_id = "..."
    github_access_token = "..."
    github_login_name = "ryym"

gharry's People

Contributors

ryym avatar

Watchers

 avatar  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.