hubormaster

0.5.0 • Public • Published

hubormaster CircleCI codecov

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

Hubormaster in Action

Installation

npm install hubormaster
# or 
yarn add hubormaster

Usage

import Hubormaster from 'hubormaster';
 
// will post to github.com/:owner/:repo
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

Dependents (0)

Package Sidebar

Install

npm i hubormaster

Weekly Downloads

2

Version

0.5.0

License

MIT

Unpacked Size

215 kB

Total Files

3

Last publish

Collaborators

  • pveyes