Code Monkey home page Code Monkey logo

ambition-slack's Introduction

ambition-slack

Slack integration for Ambition

This project is hosted on Heroku and provides various integrations for Ambition's Slack service.

Adding a User

  1. Add a SlackUser for the account; use the slack username for the username field.

  2. Specify the timezone

  3. Set the expects_morning_digest field to True if the user should receive a morning digest

  4. Create a GithubUser record with the github username and point it to toward to the new SlackUser record

  5. Create a "Personal API Token" in Github and add it to the new GithubUser record

Getting Started in Development

Setup a Heroku account.

Have Wes add you as a collaborator on the project.

Install the Heroku Toolbelt

Fork and clone the repo github.com/ambitioninc/ambition-slack

Add heroku as a remote:

git remote add heroku https://git.heroku.com/ambition-slack.git

You're ready to go!

Slack

Add a SlackUser for every account in Ambition. The information for the account consists of the Slack username, the email, the full name of the person and their timezone. The timezone defaults to US/Eastern. The SlackUser model also has a boolean field, expects_morning_digest. This specifies if the user receives a morning digest.

Github

A Github hook is provided in the Github app and exists at the url http://ambition-slack.herokuapp.com/github/. This hook should be added as a webhook to every repo, and it should be sent every event from the repo. The hook searches for messages about pull requests and about comments on pull requests. If a user is tagged, they are notifed by their slack bot with the proper pull request URL.

To configure the Github integration, make a GithubUser model and point it to the proper SlackUser model. The GithubUser model must contain the appropriate username on Github.

In order to appropriately generate a morning digest, the GithubUser model also needs a user specific api token. Simply go to github, click the user icon in the top right, click 'settings', 'Personal access tokens', 'Generate new token' and select the 'repo' scope. Add the resultant token to the appropriate GithubUser model.

Digest

Every weekday morning, the digest app constructs a Morning Digest and sends it to all users at 10:00 AM in the users timezone. The digest includes a list of all assigned and @mentioned pull requests. Doing this requires pinging the github API and asking for current open issues for all users.

The morning digest is generated by the generate_morning_digests management command, which runs every hour as a Heroku scheduled job. Click here to view the scheduled job.

ambition-slack's People

Contributors

brettwise avatar jodything avatar joshmarlow avatar wesleykendall avatar

Stargazers

 avatar

Watchers

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

ambition-slack's Issues

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.