hubormaster

Phabricator-style lint and test result for your GitHub repository
Hubormaster (read: habormaster) is a module to help writing comments for your lint and test result in your GitHub repository.
It's similar to how Phabricator's harbormaster.sendmessage
works: you can specify list of lint result that will be
posted inside inline comment on specific code in a commit (either in pull request or in main branch) or test result
that will be posted as commit comment
Preview

Installation
npm install hubormaster
yarn add hubormaster
Usage
import Hubormaster from 'hubormaster';
const hubormaster = Hubormaster({
owner: 'user/org',
repo: 'repoName',
sha: 'commitShaLong',
});
await hubormaster.sendMessage(lints, tests);
It (currently) only has 1 API sendMessage
which accepts these argument types (similar to Phabricator sendMessage type signature):
type lints = Array.<{
code: string,
severity: "error" | "warning" | "autofix",
path: string,
line: int,
description: string
}>;
type tests = Array.<{
engine: string,
result: "pass" | "fail",
duration: float,
path: string,
details: string
}>
Examples
You can see usage example on examples/self.js
. In fact, that exact code is used to post hubormaster comment to hubormaster
repository 💥
License
MIT