ErrandBoy is the admin support tool.
ErrandBoy helps a administrator job. It executes the action when administrator merged pull request. If you want to request for slack invitation to administrator, all it takes is to write a request file and create pull request to the ErrandBoy repository. When the administrator merge pull request that allowed by him, ErrandBoy sends slack invitation mail instead of the administrator.
* See errandboy_example
gem 'errand-boy'
$ mkdir ./index
$ mkdir ./requests
$ touch ./requests/.keep
#!/usr/bin/env ruby
require 'bundler/setup'
require 'errand_boy'
ErrandBoy::Brain.new.command
machine:
timezone:
Asia/Tokyo
ruby:
version:
2.3.1
post:
- sudo service mysql stop
- sudo service postgresql stop
dependencies:
pre:
- gem install bundler -v 1.11
override:
- bundle install
test:
override:
- echo "-----no test-----"
deployment:
run:
branch: /master|.*request.*/
commands:
- git config --global user.name errand-boy
- git config --global user.email errandboy0.1.0@gmail.com
- bin/exe
Get a slack access token from https://api.slack.com/web:
Build CircleCI project from https://circleci.com/add-projects:
place: Project Settings >> Permissions >> Checkout SSH keys
place: Project Setting >> Build Settings >> Environment Variables
Make and checkout a new branch that named including request
(prefix):
$ git checkout -b new_request
Make a new request file in requests/
folder:
- The file should be formatted by TOML.
$ vim requests/example.toml
# requests/example.toml
provider = 'slack' # Now slack only.
action = 'invite' # Now invite only.
sender = { name = 'tanaka taro', email = 'taro@example.com' } # Sender information.
# Register information. It is required information.
register = { name = 'yamada hanako', email = 'hanako@example.com' }
destination = { team = 'example' } # It is team that the register will be invited.
Push a new request file and create a pull request:
- Push a new request file
$ git add .
$ git commit -m 'request slack invite example'
$ git push -u origin new_request
- Create a new pull request on your
errand_boy
repository.
Merge pull request by administrator:
ErrandBoy executes the action when the administrator merge pull request.
If you want to see invite histories, you can see index/***.csv
on your errand_boy
repository.
SLACK_ACCESS_TOKEN - You should set slack access token on CircleCI.
Bug reports and pull requests are welcome on GitHub at https://github.com/bm-sms/errand_boy.
The gem is available as open source under the terms of the MIT License.