markdownReporter
markdownReporter(
headline,reports):string
Formats a rule report as used by the GitHub Actions Workflow.
If reports is empty, it will return a happy message. Otherwise it will pretty-print the reports, grouped by rule.
Parameters
Section titled “Parameters”headline
Section titled “headline”string
Headline text for the report (typically entity information)
reports
Section titled “reports”Rule reports as returned by runOctoGuideRules
Returns
Section titled “Returns”string
Formatted markdown string for GitHub comment
Example
Section titled “Example”import { markdownReporter, runOctoGuideRules } from "octoguide";
const { entity, reports } = await runOctoGuideRules({ entity: "https://github.com/OctoGuide/bot/issues/19",});
console.log(markdownReporter(entity.data.html_url, reports));