INNER CODE UNIT · TypeScript
routeLogForDiagnostics
github/branch-deploy · tools/acceptance/index.ts:128
function routeLogForDiagnostics(routeLog: readonly MockRouteLog[]): unknown {
return routeLog.map(route => ({
accept: route.accept,
apiVersion: route.apiVersion,
authorizationPresent: route.authorizationPresent,
method: route.method,
path: route.path,
query: route.query,
userAgent: route.userAgent,
body: route.body === '' ? '' : route.body.slice(0, 500)
}))
}
function stateForDiagnostics(state: MockGitHubState): unknown {
return {
branches: [...state.branches.keys()].sort(),
comments: state.comments.map(comment => ({
id: comment.id,