bots-tiktok

command module
v4.1.0-0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2019 License: LGPL-3.0 Imports: 6 Imported by: 0

README

Tik-Tok Bot - Distinguished Scrum Master

Tik-Tok v4 is an always on services type bot.

Compiling

Tik-Tok Modules if you want to compile or contribute. Binaries are in the release section.

go get github.com/robfig/cron
go get github.com/nlopes/slack
go get github.com/google/go-github/github
go get golang.org/x/oauth2
go get github.com/parnurzeal/gorequest
go get github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/mysql
go get github.com/BurntSushi/toml
go get github.com/jinzhu/copier

Startup Parameters

Tik-tok requires specific parameters to run/start. These can be passed in via OS Environment variables or as CLI Parameters. You must use one or the other you can not mix these specific parameters between the two options.

Tik-Tok required parameters

  -osenv  If used, specifies that required parameters will be passed via OS Environment variables. 
          If omitted Tik-Tok will check the CLI Parameters instead

Usage of Tik-Tok.go via CLI Parameters:

  -tkey        Trello API Key
  -ttoken      Trello API Token
  -slackhook   Slack API Webhook URL (required)  
  -slacktoken  Slack Bot Token
  -slackoauth  Slack App User OAuth Token (required to manage slack channels)
  -git         Github API Token
  -dbuser      Google Cloud SQL User
  -dbpass      Google Cloud SQL Password

Usage of Tik-Tok.go via OS Environment Parameters:

  tkey=        Trello API Key
  ttoken=      Trello API Token
  slackhook=   Slack API Webhook URL (required)  
  slacktoken=  Slack Bot Token
  slackoauth=  Slack App User OAuth Token (required to manage slack channels)
  git=         Github API Token
  dbuser=      Google Cloud SQL or MySQL User
  dbpass=      Google Cloud SQL or MySQL Password

Tik-Tok optional CLI parameters

  -v       Return version number and exit.  Causes exit regardless of other parameters passed.  
           Can be used alone
  -nocron  Do not load built-in cronjobs on start.  crons.toml

Bot Usage Help

https://github.com/scottish-terror/bots-tiktok/wiki/Tik-Tok-Help

TOML Configs

Tik-Tok has a Tik-Tok.toml file that has some base configuration parameters you need to set for it to run. See this file in the /cfg/ directory for details.

Each team/board that needs Tik-Tok to operate on it must be configured a specific way and then contain a .TOML file with the settings and configuration for that board. Below is how to configure your specific board .TOML file. Tik-Tok does not need to be restarted if a new .TOML file is built and added to his working directory. He will find it on command. The name of the TOML file (minus the extension) is how you will refer to that when talking to Tik-Tok. For example a file called SAAS.toml will be referred to when talking to Tik-Tok as [SAAS].

Configuring your Trello Board
  • Board must be created ahead of time you will need the boardID. BoardID is in the URL when viewing the board. https://trello.com/b/<BOARDID>/

  • Board must initially have colum/list names Matching the list below. NOTE: Columns/Lists can be renamed once the ID's have been acquired, but can not be deleted and re-created without getting the new ID

  • On new board you must create the following labels worded like this to enable specific features. Just like lists you can rename or re-color labels at any time after initial configuration, but if you delete them and re-create them you will need to get the new label ID and update Tik-Tok's config. Initially they must be named this way and can be any color.

    • ROLL-OVER
    • TEMPLATE CARD DO NOT MOVE
    • DEMO
    • Training
    • Tik-Tok Hush
  • Board must have custom fields power-up enabled and the following fields created. These can not be renamed. (Trello limitation)

    • Number Field called: Burndown
    • Text Field called: Sprint
Column/List Name initial requirements for auto-config
  • Backlog
  • Upcoming
  • Scoped
  • Next Sprint
  • Ready for Work
  • Working
  • Ready for Review
  • Done
Configure the DB
  • Create a GCP Cloud SQL DB or any MySQL DB on any server and properly configure the tiktok.toml settings.
  • Execute the buildout.db SQL file against the DB to build the initial database. Do not edit this file.
Have Tik-Tok start your config for you

To find all the unique Trello UID's for the TOML config file, you can ask Tik-Tok to find them for you. This will help you build your config file. @Tik-Tok build a configuration file for [<trello board id>]. He will then DM you the results in slack.

CRON JOBS

  • All cron jobs for Tik-Tok are contained in the toml file called crons.toml stored in Tik-Tok's working directory. This file can be edited at any time and you can issue a reload cronjobs command to Tik-Tok and he will re-read the file and load the new changes. He will log errors around this in whichever slack channel you've specified logging to go to.
Available Cron Functions

PERMISSIONS

For specific tasks (such as shutdown) Tik-Tok will require you to have permissions. Other permissions (such as launching a new sprint) will require the user to a member of a specific private slack channel. These are handled by Slack channel membership. Creating or pointing TikTok to specific private or public slack channels in the tiktok.toml will set permissions accordingly.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL