cobot
A user-experience-focused middleware for building Gitlab applications. more examples.
Support frameworks: Express / Koa.
Why cobot?
-
NO APIS
-
Friendly user experience design
-
Include
.d.ts
, support for automatic completion in editor. -
Semantic actions.
How to use
-
install robot:
yarn add cobot
ornpm i cobot
. -
import to your nodejs server:
// expressapp.usecobot.express // koa2app.usecobot.koa
- set webhook on gitlab:
Settings > integrations > url('http://{yourhost}/{any}') > Add webhook
. you can fill in any api with your nodjes server, robot automatically identifies requests from webhooks.
Example
ok
when webhook is triggered.
1. Print bot.onBotEvents.MergeRequest, console.log'ok'
thanks your issue
when a new issue opened.
2. Reply bot.onBotEvents.IssueOnOpen,
3. Use await/async in callback
bot.onBotEvents.MergeRequest,
4. Don't worry about interfaces and methods
Support events
BotEvents =