File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ const pingScrumMasters = (robot, text) => {
154154 typeof parsedBody . events === "undefined" ||
155155 parsedBody . events . length === 0
156156 ) {
157- robot . emit ( "error" , `problem getting scrummaster : '${ body } '` )
157+ robot . emit ( "error" , `scrummasters not found : '${ body } '` )
158158 return
159159 }
160160 const scrummaster = parsedBody . events [ 0 ] . title
@@ -167,17 +167,16 @@ const pingScrumMasters = (robot, text) => {
167167 } )
168168}
169169
170- module . exports = ( robot ) =>
171- setInterval ( ( ) => {
170+ module . exports = ( robot ) => {
171+ robot . error ( function ( err ) {
172+ robot . logger . error ( err )
173+ robot . send ( { room : room } , `Error while running fastlane bot: ${ err } ` )
174+ } )
175+
176+ return setInterval ( ( ) => {
172177 endCursor = null
173178 fastlaneCards . length = 0
174- robot . error ( function ( err , res ) {
175- robot . logger . error ( err )
176- robot . send (
177- { room : room } ,
178- `there is an issue with the fastlane bot '${ err } '`
179- )
180- } )
181179
182180 reportFastlaneCards ( robot )
183181 } , interval )
182+ }
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ const teamupCalendarKey = 'ks1c2vhnot2ttfvawo'
22const teamupToken = process . env . HUBOT_TEAMUP_TOKEN
33
44module . exports = ( robot ) => {
5- robot . error ( function ( err , res ) {
5+ robot . error ( function ( err ) {
66 robot . logger . error ( err )
7- res . send ( `there is an issue with the fastlane bot ' ${ err } ' ` )
7+ robot . send ( `Error while running scrummaster bot: ${ err } ` )
88 } )
99 robot . hear ( / s c r u m ( \s | - ) ? m a s t e r ( s ) ? / gi, ( res ) => {
1010 const dateString = new Date ( ) . toISOString ( ) . slice ( 0 , 10 )
@@ -23,7 +23,7 @@ module.exports = (robot) => {
2323 return
2424 }
2525 if ( typeof parsedBody . events === 'undefined' || parsedBody . events . length === 0 ) {
26- robot . emit ( 'error' , `problem getting scrummaster : '${ body } '` , res )
26+ robot . emit ( 'error' , `scrummasters not found : '${ body } '` )
2727 return
2828 }
2929 const scrummaster = parsedBody . events [ 0 ] . title
You can’t perform that action at this time.
0 commit comments