INNER CODE UNIT · TypeScript
stateForDiagnostics
github/branch-deploy · tools/acceptance/index.ts:141
function stateForDiagnostics(state: MockGitHubState): unknown {
return {
branches: [...state.branches.keys()].sort(),
comments: state.comments.map(comment => ({
id: comment.id,
body: comment.body.slice(0, 500)
})),
deployments: state.deployments.map(deployment => ({
id: deployment.id,
environment: deployment.environment,
ref: deployment.ref,
sha: deployment.sha,
statuses: deployment.statuses.map(status => status.state)
})),
labels: [...state.labels].sort(),
lockFiles: [...state.lockFiles.keys()].sort(),
pullRequest: state.pullRequest,
reactions: state.reactions.map(reaction => ({