brigade.js
// and determining whether or not to trigger an action
and determining whether or not to trigger an action
and determining whether or not to trigger an action
function handleIssueComment(e, p) {
  console.log("handling issue comment....")
  payload = JSON.parse(e.payload);
  comment = payload.body.comment.body.trim();
  switch(comment) {
    case "/brig run":
      return runSuite(e, p);
    default:
      console.log(`No applicable action found for comment: ${comment}`);
  }
}
function handleIssueComment ( e , p ) { console . log ( "handling issue comment...." ) payload = JSON . parse ( e . payload ) ; comment = payload . body . comment . body . trim ( ) ; switch ( comment ) { case "/brig run" : return runSuite ( e , p ) ; default : console . log ( ` ${ comment } ` ) ; } }
and determining whether or not to trigger an action
and determining whether or not to trigger an action
// Extract the comment body and trim whitespace // Here we determine if a comment should provoke an action // Currently, the do-all '/brig run' comment is supported, // for (re-)triggering the default Checks suite