import { execSync } from "child_process" ; import { PRsRes as Pull } from "./api" ; param cmd export const exec = ( cmd ) => execSync ( cmd ) . toString ( ) . trim ( ) ; param timestamp export const toTime = ( timestamp ) => new Date ( timestamp ) . getTime ( ) ; export function formatPR ( pr , format = "- %m (#%n, thanks @%a)" ) { return format . replace ( "%n" , "" + pr . number ) . replace ( "%m" , pr . title ) . replace ( "%a" , pr . author . login ) ; }