sarupbanskota / WIP2Slack

Sync WIP todos with Slack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sync today's WIP completed todos to your Slack channel

wip2

0⃣ Clone this repo and get in: git clone https://github.com/sarupbanskota/WIP2Slack && cd WIP2Slack

1⃣ Setup an incoming webhook and note your Incoming webhook URL. You can choose which channel to post to in this step. If you've got multiple project channels you want to post to, you could setup multiple incoming hooks.

2⃣ Obtain your WIP private API key URL from the API page.

3⃣ Determine your WIP User ID - first complete a todo, then visit the GraphiQL instance. Type in the following and you should see your name at the top:

{
  todos {
    user {
      id
      username
    }
  }
}

4⃣Export all necessary environment variables

 > export WIP_USER_ID=1096
 > export WIP_PROJECT_NAME=rojak
 > export WIP_API_KEY=xxxxx
 > export SLACK_WEBHOOK_URL=xxxx

5⃣Run the main file:

> ruby main.rb

> #<Net::HTTPOK:0x00007ff91c119d20>

Now get back to work.

Footnotes

The code is hacky in true WIP spirit. This is a community service project - do whatever you like with it! Feel free to send in a PR, I'll merge it if it makes sense to.

If this saved you a half hour, you could thank me with coffee money :-)

About

Sync WIP todos with Slack

License:GNU General Public License v3.0


Languages

Language:Ruby 100.0%