• This repository has been archived on 29/Sep/2023
  • Stars
    star
    106
  • Rank 314,478 (Top 7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bot to move conversations from Slack to Discourse.

Wisemonk

Wisemonk is a slackbot to keep people from wasting too much time on Slack. It isn't just another bot, its a super intelligent one. You can tell it what channels to monitor and then it can

  • alert you when you are talking too much.
  • automatically create a topic on discourse with the contents of your chat and share the url with you.
  • create a topic on demand on discourse.

A lot of teams have found that the synchronous nature of communication on slack destroys the productivity of their team members.For more on that read this article here. Thus we at Dgraph try to have most of our structured and meaningful conversations on Discourse. Wisemonk constantly monitors our communication and helps us move our discussion to discourse when we are talking a lot.

Install

go get github.com/dgraph-io/wisemonk

go install github.com/dgraph-io/wisemonk

We use govendor to manage our deps and all our deps our checked in to the repo so you don't need to install them separately.

Usage

Add config to config.json.

{
  // slackbot token.
  "token": "",
  "discourseprefix": "https://discuss.dgraph.io",
  // discourse api key.
  "discoursekey": "",
  "channels": {
      // slack channel id
      "G1D59039B": {
        // interval should be a value that can be parsed by https://golang.org/pkg/time/#ParseDuration.
        "interval": "10m",
        "maxmsg":20,
        // slug of discourse categories that wisemonk would search in.
        "search_over":["minions","dev","user","decisions","reading","blog","faqs","docs","use-cases","recruit"],
        // slug of discourse category that a new topic would be created in.
        "create_topic_in": "slack"
      },
    }
}

After adding config, since the wisemonk binary is now installed and if you have $GOPATH/bin in your path you can call wisemonk like this wisemonk

Now if in any 10 minute interval more than 20 messages are exchanged, wisemonk would alert you.

Token for slack can be obtained after creating a bot user at https://api.slack.com/bot-users. Also note that you would have to add wisemonk as a user to all the channels that you want it to be active on.

If you use discourse, then wisemonk has some other advanced functionalities that you could make use of. Wisemonk stores the messages exchanged and automatically creates a discourse topic for you, a link of which it shares while sending the alert.

You could customize the alert message displayed. For now we display Yoda, followed by a Go Proverb and then the link for the discourse topic if a discourse key and discourse prefix are given as config.

Interaction

  • You can search over your topics in discourse like

    wisemonk query [query_string] [max_count]

    So wisemonk query release v0.3 5 would return url of top 5 topics which have release v0.3 as part of them.

  • Sometimes you are having an important discussion on slack and don't want wisemonk to interrupt you. In these scenarios you could ask the wisemonk to meditate for some time like this in your slack channel.

    wisemonk meditate for 20m

    If successful, wisemonk replies with Okay, I am going to meditate for 20m. The duration can be anything understood by ParseDuration.

  • If you are using discourse and you observe that you are having an important discussion, you could create a discourse topic from slack using wisemonk. This topic would have your last n messages and would provide relevant context for further discussion on discourse. The command for creating a topic is

    wisemonk create topic [title of discourse topic]

    Wisemonk will reply back with the url of the new topic that was created.

Technologies involved

Wisemonk is written in Go and makes use of

About the project

Wisemonk was born out of our experience at Dgraph. Read more about why we built it in our blogpost.

We got featured on Hacker News too.

More Repositories

1

dgraph

The high-performance database for modern applications
Go
19,791
star
2

badger

Fast key-value DB in Go.
Go
12,961
star
3

ristretto

A high performance memory-bound Go cache
Go
5,088
star
4

dgo

Official Dgraph Go client
Go
347
star
5

dgraph-js

Official Dgraph JavaScript client
JavaScript
322
star
6

sroar

Serialized Roaring Bitmaps
Go
267
star
7

pydgraph

Official Dgraph Python client
Python
261
star
8

dgraph4j

Official Dgraph Java client
Java
157
star
9

travel

Starter Kit For Building Graph Database Go and Browser Apps Using Dgraph
Go
126
star
10

graphoverflow

Run the entire StackOverflow on Dgraph. Work in progress.
JavaScript
116
star
11

ratel

Dgraph Data Visualizer and Cluster Manager
JavaScript
114
star
12

benchmarks

Run benchmarks with RDF data
Go
97
star
13

badger-bench

Benchmarks of Badger
Go
92
star
14

graphql-sample-apps

This repository contains sample GraphQL applications powered by Dgraph.
JavaScript
73
star
15

dgraph-js-http

A JavaScript HTTP client for Dgraph
TypeScript
67
star
16

gru

Help identify the right minions
JavaScript
46
star
17

dgraph-lambda

TypeScript
39
star
18

tutorial

A Tour of Dgraph
HTML
38
star
19

dgraph-docs

A native GraphQL Database with a graph backend
Shell
35
star
20

charts

Helm charts for Dgraph
Shell
32
star
21

ingressutil

Utils for building an ingress controller
Go
31
star
22

flock

Twitter on Dgraph
Go
31
star
23

dgraph.net

Official Dgraph .NET Client
C#
28
star
24

dgraph-operator

Dgraph Operator creates/configures/manages Dgraph clusters atop Kubernetes
Go
23
star
25

hugo-dgraph-theme

Hugo theme used for our blog
CSS
22
star
26

typhoon-ui

๐ŸŒ€ typhoon-ui: Token-based React component library built using emotion.
TypeScript
14
star
27

mediawiki-dgraph-skin

Mediawiki skin used by Dgraph wiki.
CSS
13
star
28

hugo-docs

Theme for Dgraph documentation built via Hugo
HTML
13
star
29

experiments

Go
13
star
30

graphql-kanban

Project management app written with Dgraph and Apollo Client
TypeScript
13
star
31

svelte-urql-example

Svelte
12
star
32

slash-graphql-cli

Command Line Tools for Slash GraphQL
TypeScript
11
star
33

auth-webinar

Resources for Serverless Authentication + Authorization Webinar
JavaScript
9
star
34

discuss-tutorial

Discuss clone app built for a tutorial
CSS
8
star
35

tove

Crash vulnerability tests for Badger using the ALICE framework
Go
7
star
36

graphql-dgraph-web

GraphQL Web
SCSS
7
star
37

graphql-asia-workshop-2020

JavaScript
7
star
38

rails-graphoverflow

Showcase of using Dgraph in Ruby on Rails
Ruby
7
star
39

dgraph-react-todomvc

TodoMVC in React with GraphQL, Dgraph, NoSQL graph database
JavaScript
7
star
40

grpc-proxy

Go
6
star
41

webinar-1-twitter-graphql

JavaScript
5
star
42

react-slash-graphql-starter

JavaScript
4
star
43

gatsby-dgraph-graphql

A simple blog app with Gatsby and Dgraph's GraphQL API
JavaScript
4
star
44

auth0-integration

Slash GraphQL + Auth0 integration quick start
JavaScript
4
star
45

tweetsletter-workshop

JavaScript
4
star
46

dgraph-day

Learn graph database best practices from experts using Dgraph at scale in production and building the next generation of apps. Sign up for the FREE virtual event, April 15-16th.
4
star
47

hello

Dgraph's take on Go present
JavaScript
3
star
48

live-demo

JavaScript
3
star
49

dev-jokes

Slash powered DevJokes Application
JavaScript
3
star
50

Install-Dgraph

Dgraph installation scripts
Shell
2
star
51

workshop

Dgraph workshop: Build a Twitter graph with Dgraph!
2
star
52

video-tutorial-todo

JavaScript
2
star
53

vlg

Dgraph's Very Large Graph (WIP) Project
Go
2
star
54

website-old

Website code for dgraph.io
CSS
2
star
55

tudo-tutorial

Tutorial for building a GraphQL React app with Slash GraphQL
JavaScript
2
star
56

dgraph-io.github.io

Dgraph blog
HTML
2
star
57

cloud-docs

Documentation for Dgraph Cloud
Shell
1
star
58

discuss-tutorial-vue

CSS
1
star
59

developer-connect-sessions

1
star