Giter VIP home page Giter VIP logo

slack-pair's Introduction

slack commands for communicating about pairing / coworking with your team

So you can find teammates to pair on the company website or a bite to eat, for example:

Slack-Pair example screenshot

Usage

Use "/pair" alone to list the status of all teammates:

/pair

Yes! Someone should come find me now. Let's pair:

  • Jeremia: "Want to work on design today! Open to other ideas."
  • Giselle: "Would love to do learn some JS today, or teach design"

OK. I'm working now but feel free to interrupt me:

  • Molly
  • Tom

Nope. Do Not Disturb:

  • Jason: travelling
  • Maksim
  • Peter: deadlines!

Use "/pair [yes/ok/no]" to set your status

/pair yes

Yes! You want to pair. Use "/pair yes [subject]" to specify the [subject] you want to pair on.

or

/pair ok

OK! You're working but are OK with occassional interruptions for brief pairing.

or

/pair no

Bummer! You're too busy for pairing.

Setup & Run

  1. get a copy of the source: git clone https://github.com/techieshark/slack-pair.git && cd slack-pair
  2. you can start it by just running npm start, but first:
  3. follow the instructions for configuring the Slack integration.
  4. If you want notifications sent to a channel (e.g. "Samantha says yes to pairing (kernel debugging)"), configure an incoming webhook (name=pair, description="pair with buddies", channel = whatever channel you want things sent to), then copy the channel & webhook url to your config file and uncomment the lines for SLACK_PAIR_CHANNEL and SLACK_WEBHOOK_URL. Make sure to $ source your-slack-domain.env after you've copied and edited the env.sample.
  5. By default, pair will run using an in-memory data store, which works for testing purposes but as soon as the app restarts (which could be more than once a day on Heroku), the list of users wanting to pair will be wiped. To prevent that, set up a MongoDB database, update MONGO_URL in your environment (see env.sample) and switch DB_PROVIDER from memory to mongo (again, see env.sample).

Deploying to Heroku

  1. Follow the setup instructions above. You should have pair up and running on your development machine, and connected to Slack through an ngrok-provided URL.
  2. Create a heroku app: heroku create your-app.
  3. Copy heroku-sample.env to your-app.heroku.env. Put your environment settings in that file.
  4. If you want to user MongoDB, create that addon: heroku addons:create mongolab:sandbox. You'll need to create a new user / password and update the MONGO_URL in your environment settings. If you don't do this, you'l just run in memory and the pair list will reset fairly often (ok for testing, a bummer for production).
  5. Push your confit to heroku: heroku config:push -e your-app.heroku.env.
  6. Deploy to Heroku: git push heroku master
  7. Update Slack's URL setting in the Custom Integration you set up in Setup & Run above. Your URL should look like https://your-app.herokuapp.com.
  8. Enjoy!

Contributing

Pull requests are welcome and encouraged! You'll need

  1. A slack account and the ability to add slash commands
  2. ngrok or some other method of exposing a local port through a public URL

Once you pull down the project, simply run npm install to set up the dependencies. There is a required PAIRBOT_URL environment variable but you can source env.sample to set it. This is used so that the bot pings itself to keep the Heroku dynos up.

Then you should be able to just npm start (or node web.js) and be off to the races.

You'll be wanting a slack command integration and supply a publicly accessible URL along with a testing command. Slack uses these commands to trigger the integration. To test out your app you'll tell slack to /<your_testing_command> ok test all the things.

Of course, if you run into any problems you can always open an issue.

Credits

This is a collaborative project. We welcome your contributitions (see above). Ping @techieshark on twitter if you want to get involved.

Code originally by @jeremiak & @techieshark. Other collaborators listed here: https://github.com/techieshark/slack-pair/graphs/contributors.

Special thanks to Ainsley (@ainsleywagon) for designing such a cool pair icon (https://thenounproject.com/term/pair/19161/).


happy pairing :)

slack-pair's People

Contributors

dferramosi avatar jeremiak avatar kharshawat avatar techieshark avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

slack-pair's Issues

/pair help

Nobody knows how to use our tool. Let's make that easier to understand

make text more minimal after multiple uses

@maya- and @mollymcleod suggested that we might drop some of the help text after the user has been using pairbot for a while.

Currently, text looks like:

Yes! Someone should come find me now. Let's pair:
techieshark: i like all the things
Ok. I'm working but feel free to interrupt me:
james: that
Nope. Do Not Disturb:
maya: qwerty
Usage: /pair yes|ok|no (or just "/pair" to see the list)
---------------------- Pair up, yo. (Go find 'em!) ----------------------

But we could assume that after a user uses the bot, say, five times in a month, they understand the meaning of the Yes/OK/NO status and understand the usage, so we could drop the text:

Yes!
techieshark: i like all the things
Ok:
james: that
Nope:
maya: qwerty
---------------------- Pair up, yo. (Go find 'em!) ----------------------

Frontend integration with TVs

When someone sets their pair status to "yes" or "yes ", we should flash their name, photo, and comment up on the big screens for a minute.

This would:

  • serve as a reminder that people want to be pairing,
  • incentivize using pairbot, and
  • help people randomly notice other people they could be helping or learning from

Maybe @KHarshawat could help with frontend design for this?

Configuring Slack integration instructions

To assist in setting up Slack when adding the command, we present:

Adding pair to Slack as a custom integration

  1. Visit https://slack.com/apps/build
  2. Chose 'Make custom integration'. If you belong to multiple Slack teams, make sure the team drop down is correct (and the Slack URL should look like https://_your-slack-domain_.slack.com/apps/build/custom-integration).
  3. Chose the option for 'Slash Commands'
    image
  4. Enter /pair as the command and click 'Add Slash Command Integration'.
    image
  5. On the next page, under 'Integration Settings', you'll see command set to /pair. Now we just have a few more things to set up.
  6. Leave the URL empty for now (we'll come back to it later).
  7. Under 'Customize Name', enter pair.
    image
  8. Pick an icon. An easy albeit silly one is :pear: (:pear:) emoji, and a better one is the pair programming icon Ainsley (@ainsleywagon) made: https://thenounproject.com/term/pair/19161/.
    dbf5552e-d4d6-49a0-b9d9-61b5d0d5ba2f
  9. Set the following:
Description: Team up with other people
Usage hint: [yes | ok | no <what you want to pair on>]
Descriptive label: Pair (team up) with other slack users on ad-hoc basis.

03a5884c-9695-448c-89d3-bd9562589819

10. Grab your `Token` from the same Slack configuration page. Copy sample.env to your-slack-domain.env, edit it to set the `SLACK_TOKEN` you had found just now, and make those environment variables available in your shell via `$ source your-slack-domain.env`. 11. Run the app: `$ npm start` (which just runs `$ node web.js`). 12. In another terminal, run ngrok so you have a public URL for your slack app: Use `$ ngrok 5000` since by default the app runs on port 5000. 13. ngrok will give you a publicly accessible URL that you can paste in to the Slack config page for the `URL` field (something like `https://abcxyz.ngrok.com`). 14. Click 'Save Integration' on the bottom of the page. 15. Test it: in Slack, type `/pair` and hit enter. You should see some console logging showing that the command came through the web, and you should see a response in Slack. **_IT'S ALIVE!**_

If all goes well, you'll soon be pairing on everything from building websites to grabbing a bite:

image

make MongoDB not required?

To make it so users can get up and running quickly with an in-memory store, we might want to not require MongoDB.

This might also help with possibly running on Redis or something later too.

Extend Pair to TV and add Kudos!

For Kudos/Hi-fives

  • Fork Team PR's ainsleyperfect.herokuapp.com to be reused for Kudos (talk to maks since he generalized it)

For Pair and Kudos

  • Create a page for the TV screen that shows all the Kudos/Pairs available
  • Create a widget to pop over any existing TV page showing a new pair or kudos in real-time

Use dese mokx
pairs highfives-02
pairs highfives-01

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.