Skip to content

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.

string

Headline text for the report (typically entity information)

RuleReport[]

Rule reports as returned by runOctoGuideRules

string

Formatted markdown string for GitHub comment

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));