DEV Community

Cover image for QualityHub v1.2.0 — Your CI now posts quality reports directly on your MRs
Younes Ben Tlili
Younes Ben Tlili

Posted on

QualityHub v1.2.0 — Your CI now posts quality reports directly on your MRs

In my last article, I showed how qualityhub analyze gives you a risk score and go/no-go decision after every test run.
At the end, I mentioned this was coming:

Auto-commenting on MRs — qualityhub analyze --comment posts directly on your GitLab MR or GitHub PR

It's shipped. Here's what it looks like.

The problem with markdown reports
v1.1.0 already had --format markdown. You could generate a quality report and... do whatever you wanted with it. Most people saved it to a file and manually copied it somewhere.
That's one step too many.
The whole point of catching regressions is to surface them at the moment a developer is making a decision — when they're reviewing a merge request. Not buried in a CI log. Not in a separate tool. Right there, on the MR.

What v1.2.0 does
One flag. That's it.

qualityhub analyze --comment
Enter fullscreen mode Exit fullscreen mode

Your CI runs, parses the test results, calculates the risk score, and posts this directly on your GitLab MR or GitHub PR:

GitLab merge request activity feed showing an automatic QualityHub comment with risk score 85/100 (LOW), status

The comment is automatically updated on every pipeline run. No duplicate comments piling up on your MR.

Setup: GitLab CI

quality-check:
  stage: test
  script:
    - npm test -- --coverage
    - npx qualityhub-cli parse jest ./coverage
    - npx qualityhub-cli analyze --comment
  cache:
    paths:
      - .qualityhub/   # history persists between runs → regression detection works
  only:
    - merge_requests
Enter fullscreen mode Exit fullscreen mode

Set GITLAB_TOKEN as a CI/CD variable (needs api scope). Everything else — project ID, MR number — is auto-detected from GitLab's environment variables. No extra config.

Setup: GitHub Actions

- name: Run tests
  run: npm test -- --coverage

- name: QualityHub analysis
  run: |
    npx qualityhub-cli parse jest ./coverage
    npx qualityhub-cli analyze --comment
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

GITHUB_TOKEN is already available in every GitHub Actions workflow. Nothing to configure.

All the options
For teams with specific setups:

# Self-hosted GitLab
qualityhub analyze --comment \
  --api-url https://gitlab.yourcompany.com \
  --token $GITLAB_TOKEN

# Explicit project + MR (outside CI)
qualityhub analyze --comment \
  --provider gitlab \
  --token $GITLAB_TOKEN \
  --project-id 123 \
  --mr-id 42

# GitHub
qualityhub analyze --comment \
  --provider github \
  --token $GITHUB_TOKEN \
  --project-id owner/repo \
  --mr-id 42
Enter fullscreen mode Exit fullscreen mode

Why this matters
When a comment appears directly on the MR, it changes the dynamic of code review.
Instead of "tests passed, let's merge", reviewers now see:

  • The exact risk score
  • Whether coverage went up or down vs the previous run
  • Any new test failures introduced by this branch
  • A clear PROCEED / CAUTION / BLOCK decision

The context is there at the moment the decision is made. Not one click away. Not in another tab. On the MR.
This is what I was trying to build when I started QualityHub: quality intelligence at the right moment.

Try it

npm install -g qualityhub-cli

# Parse your test results
qualityhub parse jest ./coverage

# Post on your MR
qualityhub analyze --comment
Enter fullscreen mode Exit fullscreen mode

GitHub: ybentlili/qualityhub-cli
npm: qualityhub-cli
MIT licensed. If this is useful, a ⭐ on GitHub goes a long way.

Part 3 of building QualityHub in public. Part 1Part 2

Top comments (0)