File tree 2 files changed +13
-7
lines changed
2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ Plugins are the core part of the bot. They are standalone pieces which listen on
46
46
47
47
_ Note: All plugin names marked with ` * ` are experimental._
48
48
49
- #### How to disable a plugin
49
+ #### Adding plugins
50
50
51
- Works need to be done in this area but for now just comment the plugin which you want to disable inside ` src/plugins/index ` file.
51
+ To add a plugin:
52
+
53
+ 1 . Create the plugin as a new file in ` src/plugins ` .
54
+ 1 . Add the plugin to the list in ` src/plugins/index.js ` .
55
+ 1 . Add the plugin to the list ` src/app.js ` to enable it by default.
Original file line number Diff line number Diff line change @@ -13,13 +13,15 @@ const bot = probot({
13
13
cert : process . env . PRIVATE_KEY || "" , // required
14
14
id : process . env . APP_ID || "" // required
15
15
} ) ;
16
- const disabledPlugins = [
17
- "prReadyToMerge"
18
- ] ;
16
+ const enabledPlugins = new Set ( [
17
+ "commitMessage" ,
18
+ "needsInfo" ,
19
+ "triage"
20
+ ] ) ;
19
21
20
- // load all the plugins from inside plugins folder except the one which are disabled
22
+ // load all the enabled plugins from inside plugins folder
21
23
Object . keys ( plugins )
22
- . filter ( ( pluginId ) => ! disabledPlugins . includes ( pluginId ) )
24
+ . filter ( ( pluginId ) => enabledPlugins . has ( pluginId ) )
23
25
. forEach ( ( pluginId ) => bot . load ( plugins [ pluginId ] ) ) ;
24
26
25
27
// start the server
You can’t perform that action at this time.
0 commit comments