@umbrellio/gbot
Gitlab bot platform.
Installation
$ yarn add @umbrellio/gbot
or
$ npm i @umbrellio/gbot
Usage
unapproved
Sends unapproved MRs to mattermost / slack. MR will be ignored if it has Draft
/WIP
mark.
$ gbot unapproved -c /path/to/config/gbot.yaml
Configuration
Each setting can be set via environment variables.
Each variable must start with GBOT_
prefix. Double underscore is interpreted as nesting, for example:
GBOT_GITLAB_TOKEN=token
GBOT_GITLAB__TOKEN=token
Example of the config file:
messenger:
url: "<chat.postMessage URL>"
token: "<TOKEN>"
channel: "<CHANNEL>"
markup: "slack"
sender:
username: "@umbrellio/gbot"
icon: "<icon url>"
slack:
usernameMapping:
pavel: "U020DSB741G"
gitlab:
token: "<TOKEN>"
url: "<gitlab api url>"
groups:
- id: 4
excluded: [1, 2, 3]
- id: 5
projects:
- id: 42
paths:
- src/**/*
- id: 43
unapproved:
emoji:
24h: ":emoji1:"
12h: ":emoji2:"
default: ":emoji3:"
tag:
approvers: false
author: false
commenters: false
onThreadsOpen: false
onConflict: false
diffs: false
splitByReviewProgress: false
requestsPerMessage: 15
checkConflicts: false
Groups in the config are Gitlab project groups. You must specify the group or the project, or both.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/umbrellio/gbot.
License
Released under MIT License.
Authors
Created by Aleksei Bespalov.