Oskar - the Slack satisfaction coach

Build Status

Description

Oskar is a Slackbot that tracks satisfaction of your team members. Every day it asks people how they're doing. This metric is stored in a database and tracked over time, allowing the team to understand which members are struggling or doing extremely well.

Everyone on your team can ask Oskar for another team member's or the entire team's current status. It is not meant to be a way of comparing people but to surface issues, unblock each other and eliminate isolation (especially in remote teams).

Please keep in mind that Oskar isn't a full-time project of ours. We do use him internally, so there's definitely an incentive for us to fix bugs fast, but since we are a frontend-focused team, rather than an engineering one, it can sometimes take a little while for us to find the time and resources to get bugs fixed up. Thanks for understanding!

Installing him on Heroku

You can deploy your own copy to Heroku with one click using this button:

Deploy

See the Heroku documentation for more info about changing the configuration variables after deployment.

Using the bot

Oskar automatically asks you two times a day how you're doing. You can reply to him with a number between 1 to 5, and he will then ask you for feedback to know what's the trigger for your current low or high.

You can send the following commands directly as a chat message to Oskar:

  • How is @member? - Tells you how a specific team member is doing
  • How is @channel? - Returns the current status for the whole group

All data is collected in a database and made visible via the dashboard, which can be found at the URL: http://your-oskar-url.com. If you're hosting on Heroku, this URL is going to be something like http://myherokuappname.herokuapp.com.

Find instructions on how to set a username/password for your team metrics, below.

The App

Tech stack

  • Oskar is build on node.js with express.js.
  • It is written in CoffeeScript (such as the node slack client it uses)
  • It uses a MongoDB database to store team member feedback
  • It (usually, but not only) runs on Heroku

Configuring Oskar

Basic Setup

There are two ways of configuring Oskar.

  1. Using local configuration: You copy the contents of the file config/default.json and create a new file config/local.json with your environment's variables.

  2. Using Heroku env variables: Use .env.sample to set up your Heroku env variables, either setting them via the command line (as described here) or directly from the Heroku panel.

Here's the config variables you need to define:

  • mongo.url (or MONGOLAB_URI for Heroku) defines the url to your MongoDB database (to create a mongoDB on Heroku, go to https://elements.heroku.com/addons/mongolab). This will be automatically generated if you create a MongoLab database as described below ("Setting up Oskar on Heroku") in step 4.
  • slack.token (or SLACK_TOKEN for Heroku) is the token of your team's Slackbot (you can create a new Slackbot here: https://yourteam.slack.com/services/new/bot)

Post all feedback messages to a group or channel

If you want to broadcast all user feedback to a channel instead of sending every status message to each user on your team via direct message, you can set the slack.channelId (or CHANNEL_ID for Heroku) config variable.

This defines the channel or group where Oskar will broadcast all user messages. On Heroku, don't add quotes around the parameter, just the channel ID: CXXXXXX.

You can find out our your Slack channel IDs here.

Additionally you can disable specific channels or users:

Set slack.disabledUsers (or DISABLED_USERS for Heroku) to disable specific users if you want certain people on your team to not receive any Oskar messages at all. Go here to find out your user IDs. When using Heroku, be sure to put the list IDs into quotes like this: "UXXXXXX", "UYYYYYY"

Set slack.disabledChannels (or DISABLED_CHANNELS for Heroku) to disable channels that Oskar is part of (Go here to find out your channel IDs). When using Heroku, be sure to put the user IDs into quotes like this: "CXXXXXX", "CYYYYYY".

Configure dashboard password protection

By default your dashboard is protected via a simple HTTP auth mechanism. (we'll try to improve this in the future)

  • auth.username and auth.password (or AUTH_USERNAME and AUTH_PASSWORD for Heroku) define your login data for the dashboard. Make sure to share those with your team.

Development and Contributing

Local environment quickstart

###Prerequisites:

You might find this helpful, if you're setting up MongoDB for the first time:

# Update the homebrew package database
$ brew update
$ brew install mongodb
# Create a data folder to store MongoDB databases, then set up the permissions for it
$ sudo mkdir -p /data/db
$ sudo chown $USER /data/db

###Run the app

# will start MongoDB on port 27071 and initialise the database
$ mongod

# Install the dependencies
$ npm install

# Start the app using Heroku Local
$ heroku local

You can then view the app at http://localhost:5000

Unit tests

Oskar is being tested with Mocha and should.js For the mongo tests to pass, you'll have to run a mongo database under mongodb://localhost:27017.

Run the unit tests for all modules:

$ npm test

To run only a single unit test call the test file explicitly, such as npm test test/inputHelper.coffee



Oskar - the Slack satisfaction coach

建立状态

说明

Oskar是一款追踪团队成员的满意度的Slackbot。每天都会问人们他们在做什么。该指标存储在数据库中并随着时间的推移进行跟踪,使团队能够了解哪些成员正在努力或做得非常好。

您的团队中的每个人都可以向奥斯卡提出另一个团队成员或整个团队的现状。这不是一种比较人们,而是面对问题的方法,解除对方并消除孤立(特别是在偏远的团队)。

请记住,奥斯卡不是我们的全职计划。我们在内部使用它,所以我们肯定有动机来快速修复错误,但是由于我们是一个前端专注的团队,而不是一个工程的团队,有时候我们可以花一点时间找到时间和资源弄错bug。感谢您的理解!

在Heroku上安装他

您可以使用此按钮一键点击自己的副本到Heroku:

有关在部署后更改配置变量的更多信息,请参阅 Heroku文档

使用机器人

Oskar自动询问你每天两次你是怎么做的。您可以用1到5之间的数字回复他,然后他会要求您提供反馈意见,以了解您目前的低点或高点的触发条件。

您可以直接向Oskar发送以下命令作为聊天消息:

  • 如何@member? - 告诉你一个特定的团队成员在做什么
  • @channel如何? - 返回整个组
  • 的当前状态

所有数据都收集在数据库中,并通过仪表板显示,可在URL中找到: http://your-oskar-url.com 。如果您在Heroku上进行托管,那么这个URL将会是这样的: http://myherokuappname.herokuapp.com

The App

技术堆栈

  • Oskar是使用express.js构建在node.js上的。
  • 它是用CoffeeScript编写的(例如它使用的节点松弛客户端)
  • 它使用MongoDB数据库来存储团队成员反馈
  • 它(通常但不仅仅是)在Heroku
  • 上运行

配置Oskar

基本设置

配置Oskar有两种方法。

  1. Using local configuration: You copy the contents of the file config/default.json and create a new file config/local.json with your environment's variables.

  2. Using Heroku env variables: Use .env.sample to set up your Heroku env variables, either setting them via the command line (as described here) or directly from the Heroku panel.

这是您需要定义的配置变量:

将所有反馈消息发布到组或通道

如果要将所有用户反馈广播到频道,而不是通过直接消息将每个状态消息发送给您的团队中的每个用户,您可以设置 slack.channelId (或 CHANNEL_ID 为Heroku)配置变量。

这定义了Oskar将广播所有用户消息的频道或组。在Heroku上,不要在参数周围添加引号,只是通道ID: CXXXXXX

您可以在此处找到您的Slack频道ID。

此外,您可以禁用特定频道或用户:

为Heroku设置 slack.disabledUsers (或 DISABLED_USERS )以禁用特定的用户,如果您希望团队中的某些人不会收到任何奥斯卡消息。请此处查找您的用户ID。使用Heroku时,请务必将列表ID放入如下引号:UXXXXXX,UYYYYYY

为Heroku设置 slack.disabledChannels (或 DISABLED_CHANNELS )以禁用Oskar属于的一部分(< here 查找您的频道ID)。当使用Heroku时,请务必将用户ID放入如下引号:CXXXXXX,CYYYYYY

配置仪表板密码保护

默认情况下,您的仪表板通过简单的HTTP验证机制进行保护。 (我们将来会尝试改进这一点)

    对于Heroku,
  • auth.username auth.password (或 AUTH_USERNAME AUTH_PASSWORD )定义您的登录数据为仪表板。确保与您的团队分享。

Development and Contributing

本地环境快速启动

###先决条件:

如果您是首次设置MongoDB,您可能会发现这有用:

# Update the homebrew package database
$ brew update
$ brew install mongodb
# Create a data folder to store MongoDB databases, then set up the permissions for it
$ sudo mkdir -p /data/db
$ sudo chown $USER /data/db

###运行应用程序

# will start MongoDB on port 27071 and initialise the database
$ mongod

# Install the dependencies $ npm install

Start the app using Heroku Local

$ heroku local

然后,您可以在 http:// localhost:5000 查看应用程序

单元测试

Oskar正在通过摩卡进行测试should.js 为了让mongo测试通过,您必须在 mongodb:// localhost:27017 下运行一个mongo数据库。

运行所有模块的单元测试:

$ npm test

只运行一个单元测试,显式调用测试文件,例如 npm test test / inputHelper.coffee




相关问题推荐