Skip to content

Aaron's Proposed Bot

apklinker edited this page Apr 6, 2021 · 6 revisions

Here is my proposal for what the slack bot would look like.

Rest API Server

Slack Bots are created in the slack workspace console. They are backed by a simple REST backend. These backends have the following endpoints:

  • /commands - used for slash commands
  • /interactions - used to handle the results of forms and shortcuts
  • /data-sources - used to populate custom data for fields in forms

If we want to use shortcuts instead of commands (like the existing HackerRank app), we actually don't need to worry about the /comnmands endpoint at all!


Flow

  1. Teammate opts into the queue using the "Join HackerRank Queue (join-queue)" shortcut
    • Shows the user a form to input their languages
  2. When a HackerRank is requested to be reviewed using the "HackerRank Review (request-review)" shortcut we
    • Prompt for the languages and due date like before
    • When submitted, notify the people at the top of the queue and start their timeouts
  3. To opt-out of the queue, teammates use the "Leave HackerRank Queue (leave-queue)" shortcut

/interactions

Shortcuts

HackerRank Review (shortcut-request-review)

This opens a form similar to the existing form, letting the requestor enter the languages used and the due date. When the form is submitted, it triggers the submit-request-review interaction

Join HackerRank Queue (shortcut-join-queue)

This opens a dialog prompting a teammate for the languages they would like to review. When submitted, it triggers the submit-join-queue interaction.

Leave HackerRank Queue (shortcut-leave-queue)

Unlike the other shortcuts, this doesn't open a form, since there is nothing to prompt the user instead, it updates the queue directly

Submissions

submit-request-review

This is where the queue logic and teammate notifications will be initiated.

submit-join-queue

The user that submitted the form will be added to the database


/data-sources

`

Clone this wiki locally