@@ -57,15 +57,35 @@ var gitCommitMessage = botOptions.gitCommitMessage = '[fix]
57
57
+ '[' + botname + '](https://github.com/blakmatrix/node-migrator-bot)'
58
58
] . join ( '\n' ) ;
59
59
60
+ botOptions . changesList = [
61
+ { name : "DoStuff1" ,
62
+ message : '[fix] git commit message' ,
63
+ func : function ( fileList , settings , cb ) {
64
+ if ( fileList . some ( function ( ele ) { return ele . indexOf ( 'wscript' ) !== - 1 } ) && fileList . some ( function ( ele ) { return ele . indexOf ( 'package.json' ) !== - 1 } ) ) {
65
+ setTotalRepositoryMatches ( settings . link ) ;
66
+ app . log . info ( 'MATCH FOUND!' . green . bold . inverse + ' for ' + settings . link . blue . bold ) ;
67
+ return cb ( null , 'OK' ) ;
68
+ } else {
69
+ return cb ( null , 'DONE' ) ;
70
+ }
71
+ } } ,
72
+ { name : "DoStuff2" ,
73
+ message : '[fix] git commit message' ,
74
+ func : function ( fileList , settings , cb ) {
75
+ app . log . info ( 'Hello world 2' ) ;
76
+ return cb ( null , 'OK' ) ;
77
+ } } ,
78
+ { name : "DoStuff3" ,
79
+ message : '[fix] git commit message' ,
80
+ func : function ( fileList , settings , cb ) {
81
+ app . log . info ( 'Hello world 3' ) ;
82
+ return cb ( null , 'OK' ) ;
83
+ } }
84
+ ] ;
85
+
60
86
botOptions . makeFileChanges = function makeFileChanges ( fileList , link , cb ) {
61
87
62
- if ( fileList . some ( function ( ele ) { return ele . indexOf ( 'wscript' ) !== - 1 } ) && fileList . some ( function ( ele ) { return ele . indexOf ( 'package.json' ) !== - 1 } ) ) {
63
- setTotalRepositoryMatches ( link ) ;
64
- app . log . info ( 'MATCH FOUND!' . green . bold . inverse + ' for ' + link . blue . bold ) ;
65
- return cb ( null , 'OK' ) ;
66
- } else {
67
- return cb ( null , 'DONE' ) ;
68
- }
88
+
69
89
70
90
} ;
71
91
@@ -130,9 +150,12 @@ botOptions.dbCheck = function dbCheck(link, cb) {
130
150
cb ( null , hashk_value ) ;
131
151
} ) ;
132
152
} ;
133
- botOptions . makePullRequest = false ;
134
- botOptions . forkRepo = false ;
135
- botOptions . deleteRepo = false ;
153
+
154
+ botOptions . makePullRequest = false ;
155
+ botOptions . forkRepo = false ;
156
+ botOptions . deleteRepo = false ;
157
+ botOptions . addOnFailedCommit = true ;
158
+ botOptions . addOnSuccessfulPR = true ;
136
159
137
160
botOptions . setTotalNPMPackages = function setTotalNPMPackages ( result ) {
138
161
totalNPMPackages = result . length ;
0 commit comments