import { join } from "path" ; import { Application } from "probot" ; import toggle from "./toggle" ; import update from "./update" ; export = ( app ) => { app . on ( "pull_request.opened" , toggle ) ; app . on ( "pull_request.edited" , toggle ) ; app . on ( "issues.closed" , update ) ; app . on ( "issues.reopened" , update ) ; app . on ( "pull_request.reopened" , update ) ; app . on ( "pull_request.closed" , update ) ; app . on ( "pull_request.synchronize" , update ) ; app . route ( "/" ) . get ( "/" , ( _ , res ) => { res . sendFile ( join ( __dirname , ".." , "index.html" ) ) ; } ) ; } ;