Skip to content
The fastest way to create GitHub issues on your phone. Add an emoji reaction on Slack and it creates an issue for you.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore first commit Aug 12, 2019
.prettierrc.yml format Aug 12, 2019
README.md fix null user expansion Aug 12, 2019
github-client.js extract api clients Aug 12, 2019
index.js fix null user expansion Aug 12, 2019
package-lock.json hide bot messages Aug 12, 2019
package.json expand slack user names Aug 12, 2019
slack-client.js fix null user expansion Aug 12, 2019
test.js fix for case when user does not exist Aug 12, 2019

README.md

emoji-to-issue

The fastest way to create GitHub issues on your phone.

Add emoji reactions to messages on Slack and it creates an GitHub issue for you.

If you don't make it an isssue, you'll forget it. Don't miss problems of your product. This module helps you to accelerate product development process, especially when you're dog-fooding.

usage

Add an emoji reaction:

Then, the issue is made:

setup

In your package.json:

"dependencies": {
  "emoji-to-issue": "uiur/emoji-to-issue#master",

Then:

npm install

configure slack emoji

https://slack.com/customize/emoji

Add custom emoji with names such as :issue: or :issue-assign-uiur:. Use alias if you want short one like: :uiu: -> :issue-assign-uiur:

This emoji generator is useful: https://emoji-gen.ninja/

write some code

Following api tokens are required:

Set those tokens via environment variables or pass it to the arguments.

const { ReactionHandler } = require('emoji-to-issue')

handler = new ReactionHandler({
  issueRepo: 'hello-ai/sandbox', // required
  reactionName: ['bug'], // default: 'issue', 'issue-assign_:assignee' etc.
  slackToken: 'bot token', // default: process.env.SLACK_TOKEN
  slackUserToken: 'user token', // default: process.env.SLACK_USER_TOKEN
  githubToken: 'github token' // default: process.env.GITHUB_TOKEN
})

// event = {
//   type: 'reaction_added',
//   user: 'UB9T3UXU0',
//   item: { type: 'message', channel: 'CGU971U2F', ts: '1565583510.003900' },
//   reaction: 'issue',
//   item_user: 'UB9T3UXU0',
//   event_ts: '1565583513.004000'
// }

if (handler.match(event)) {
  handler
    .handle(event)
    .then(() => {
      console.log('ok')
    })
    .catch(err => {
      console.error(err)
    })
}
You can’t perform that action at this time.