Skip to content

Commit

Permalink
feat: support check run summary
Browse files Browse the repository at this point in the history
  • Loading branch information
mooyoul committed Sep 19, 2019
1 parent 2a2ba10 commit 33b0fa4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as core from "@actions/core"; // tslint:disable-line
const github = require("@actions/github"); // tslint:disable-line
import { Context } from "@actions/github/lib/context";
import * as Octokit from "@octokit/rest";
import { stripIndent as markdown } from "common-tags";
import * as fs from "fs";
import * as glob from "glob";
import * as path from "path";
Expand Down Expand Up @@ -100,6 +101,24 @@ const SeverityAnnotationLevelMap = new Map<RuleSeverity, "warning" | "failure">(
output: {
title: CHECK_NAME,
summary: `${result.errorCount} error(s), ${result.warningCount} warning(s) found`,
text: markdown`
## Configuration
#### Actions Input
| Name | Value |
| ---- | ----- |
| config | \`${configFileName}\` |
| project | \`${projectFileName || "(not provided)"}\` |
| pattern | \`${pattern || "(not provided)"}\` |
#### TSLint Configuration
\`\`\`json
__CONFIG_CONTENT__
\`\`\`
</details>
`.replace("__CONFIG_CONTENT__", JSON.stringify(Configuration.readConfigurationFile(configFileName), null, 2)),
annotations,
},
});
Expand Down

0 comments on commit 33b0fa4

Please sign in to comment.