Git Product home page Git Product logo

jira-comment-slack-notification's Introduction

Get a DM in Slack when mentioned in a Jira Comment!

What is this App?

Read about how Group Nine created an application that sends us direct messages in Slack when we get mentioned in Jira comments: https://medium.com/group-nine-media-product-team/slack-notifications-for-jira-comments-1d57879bc149

Setup Instructions

Step-by-Step video
step by step video on YouTube

To setup this application you'll need:

  • A Heroku account
  • Admin access to your Slack instance
  • Admin access to your Jira instance (this setup assumes you're using Jira Cloud)
  1. Setup a Slack application
  • Go to https://api.slack.com/apps and click "Create New App"
  • Provide an Application Name ("Jira Comment Bot" seems to work well), and choose your Slack workspace from the dropdown
  • Click "Bot Users" in the "Features" section of the left-side navigation and then click "Add a Bot User"
  • Give your bot a display name and default user name and click "Add Bot User"
  • Go to "OAuth & Permissions" in the "Features section of the left-side navigation" and click "Install App to Workspace" (click Authorize on the confirmation screen)
  • Take note of the OAuth Access Token and Bot User OAuth Access Token, we'll need this later
  1. Create a Private / Public RSA Keypair for the Jira Application
  • To create the key pair, open your terminal and type openssl genrsa -out privkey.pem 2048
  • To extract the public key, type the following into your terminal openssl rsa -pubout -in privkey.pem -out pubkey.pem
  • Open privkey.pem in your favorite text editor (privkey.pem should have been generated by the previous steps)
  • Go to https://www.base64encode.org/ and paste the contents of privkey.pem into the top section and click "Encode"
  • Take note of the base64 encoded string that was generated in the bottom section
  1. Setup the app on Heroku
  • Create an account on Heroku: https://signup.heroku.com/ (a free solution for hosting applications) ย - Click this deploy button to deploy this app to Heroku ๐Ÿ‘‰ย Deploy

  • When asked to enter values for environment variables, do the following...

    • APP_URL = the URL of this heroku application ("https://WHATEVER-YOU-NAMED-THIS.herokuapp.com/") the trailing slash is important
    • JIRA_URL = the URL of your Jira application ("https://YOUR-JIRA-SUBDOMAIN.atlassian.net") the lack of a trailing slash is important
    • RSA_PRIVATE_KEY = the base64 encoded string from step 2
    • SLACKBOT_TOKEN = the Bot User OAuth Access Token from step 1
    • SLACKBOT_OAUTH_TOKEN = the OAuth Access Token from step 1
  1. Setup a Jira Application Link
  1. Setup Jira Webhook for Comments
  1. Add Features to Slack App
  1. Sign Up
  • Sign up by messaging the bot you created with the word "signup" -- click the link that the bot responds with to Auth with Jira
  1. Usage
  • @mention your username in a Jira comment to get a message in Slack

Development

  • When working locally, create a .env file in your local environment with the same Key=Value pairs that were used in Step 3 separated by new lines. Example: JIRA_URL='https://YOUR-URL.atlassian.net'
  • Start up Mongo with mongod in your terminal
  • Install the heroku CLI to start your development environment with heroku local web

jira-comment-slack-notification's People

Contributors

msolomontmg avatar edahlseng avatar

Watchers

James Cloos 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.