nl_tokens: Messages repository maintainers by submitting an issue .
pl_tokens: async function sendMessage ( app , context , title , message , { update = '' , updateAfterDays = 7 , owner , repo } = { } ) { if ( ! app || ! context || ! title || ! message ) { throw new Error ( 'Required parameter missing' ) ; } if ( ! owner || ! repo ) { ( { owner , repo } = context . repo ( ) ) ; } const appGh = await app . auth ( ) ; const { name : appName , html_url : appUrl } = ( await appGh . apps . get ( { } ) ) . data ; const { data : issues } = await context . github . issues . getForRepo ( { owner , repo , state : 'open' , creator : ` ${ appName } ` , per_page : 100 } ) ; message = message . replace ( / {appName} / , appName ) . replace ( / {appUrl} / , appUrl ) ; const messageHash = crypto . createHash ( 'sha256' ) . update ( message ) . digest ( 'hex' ) ; const messageHashRx = new RegExp ( ` ${ messageHash } ` ) ; for ( const issue of issues ) { if ( ! messageHashRx . test ( issue . body ) ) { continue ; } let commentId = null ; if ( update && ! issue . locked && Date . now ( ) - Date . parse ( issue . updated_at ) >= updateAfterDays * 24 * 60 * 60 * 1000 ) { update = update . replace ( / {appName} / , appName ) . replace ( / {appUrl} / , appUrl ) ; const { data : commentData } = await context . github . <mask> . createComment ( { owner , repo , number : issue . number , body : update } ) ; commentId = commentData . id ; } return new Message ( owner , repo , issue . number , commentId , false ) ; } title = title . replace ( / {appName} / , appName ) . replace ( / {appUrl} / , appUrl ) ; const { data : issueData } = await context . github . issues . create ( { owner , repo , title , body : ` ${ message } \n ${ messageHash } ` } ) ; return new Message ( owner , repo , issueData . number , null , true ) ; }