Coder Social home page Coder Social logo

tako's Introduction

tako

๐Ÿ™ tako is a Github notifier for Slack. It is written in Clojure and can be deployed to AWS lambda.

blame imgur if you see this

Why?

These are some (personal?) reasons to use tako:

  • Email kinda sucks. By default Github sends you an email everytime someone creates a pull request or issue on a project you follow, or when you are mentioned, etc. Being an inbox zero freak myself, depending on email to stay on top of what's going on my your github account is rather cumbersome.
  • Slack does a decent job You probably use it more than email anyway. Slack messages are easier to skim and keep clean. Most notifications don't require you to reply back.

Requirements

To run locally:

lein run YOUR_GITHUB_TOKEN YOUR_SLACK_WEBHOOK_URL

You can also create an jar with lein uberjar.

Running from AWS lambda

In my current setup I have tako running on top of AWS lambda. This is why it is cool:

  • It is free, at least for this use case. Since tako runs just a few times per hour, it will never be executed more than one million times a month (which is when Amazon starts charging you).
  • You don't need to care about configure/maintain a server
  • It is easy to update/deploy the code

All you have to do is create a new AWS lambda function and configure it:

0: Build a jar

git clone [email protected]:casidiablo/tako.git
cd tako
export GITHUB_TOKEN=your token
export SLACK_WEBHOOK_URL=the slack webhook url
./build-jar

# a jar will be assembled in tako/target/tako.jar
# by the way, the credentials are baked into the jar
  1. Sign in to the AWS Management Console and open the AWS Lambda console at https://console.aws.amazon.com/lambda/
  2. Choose Create a Lambda function.
  3. In Step 1: Select blueprint, choose the sns-message blueprint.
  4. In Step 2: Configure event source:
  • In Event source type, choose SNS.
  • In SNS topic type arn:aws:sns:us-east-1:821676841978:clock. This is a public SNS topic that sends a message every minute, perpetually, amen.
  1. In Step 3: Configure function, do the following:
  • Set the function name to tako
  • In Runtime, specify Java 8
  • In Handler type tako.core::handler
  • In Role, choose basic execution role.
  • In the Lambda function code, choose the jar produced in step 0
  • In Memory (MB), set the dropdown to 256
  • In Timeout, configure it to be 30 seconds
  1. In Step 4: Review, review the configuration and then choose Create Function. The function must look like this.

Updating code

You can upload changes from the command line by running:

# make sure you have awscli installed and configured
./lambda-deploy

Or by building a new jar and uploading it manually through the AWS web console.

Why not to use this

There's many reasons not to use this:

  • Can't reply notifications directly from Slack. Email is way better here. If you rely a lot on this feature, this is not for you.
  • Slack has serious push notification problems on Android. It is not 100% reliable. If you need to attend every notification timely it defintely could be an issue. That said, I hardly use my cellphone for this kind of stuff anyway. I built this with Slack Desktop in mind.
  • If you hate any of these things: Jeff Bezos, JVM, clojure, AWS, Slack... then it is probably not for you.

Official Github/Slack integration

Github provides an official Slack integration and is super cool and useful when you want to focus on specific repositories and you want details of every commit or tag pushed to the repo (you have to manually choose which repos you want to get slack messages from). I highly recommend this over tako for such cases. It has some quircks like notifying you of code you just pushed, which is stupid, but whatever it works well and it's easier to configure than this project. That said, I built tako to replace the notifications inbox of the Github web and avoid email; and it works for all the repos you watch, not only a few ones that you cherry pick.

tako's People

Contributors

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