Skip to content

[codex] Add scan badges support and update pipeline overview GIF - #285

Merged
fernandotonon merged 4 commits into
masterfrom
codex/pipeline-badges-release2230-gif
Apr 13, 2026
Merged

[codex] Add scan badges support and update pipeline overview GIF#285
fernandotonon merged 4 commits into
masterfrom
codex/pipeline-badges-release2230-gif

Conversation

@fernandotonon

@fernandotonon fernandotonon commented Apr 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • add optional scan badge generation to the Marketplace action (action.yml)
  • document badge generation and publishing in README + website docs
  • update the Pipeline Overview / CI/CD for 3D assets demo GIF to the one used in the v1 (2.23.0) release description

What Changed

  • action.yml
    • new inputs: generate-badges, badge-output-dir, badge-label-prefix, badge-base-url
    • new outputs: badge status + prebuilt Shields endpoint URLs
    • generate Shields endpoint JSON files for scan summary metrics (status, errors, warnings, passed, scanned, skipped)
  • README.md
    • added "Shareable Scan Badges" section with workflow snippet and markdown badge examples
  • website/src/DocsApp.jsx
    • added GitHub Actions example for generating/publishing scan badges
    • added README badge snippet example
  • website/src/data/content.js and website/src/App.jsx
    • added media.pipelineCiCd and used it in the Pipeline Overview section image

Validation

  • npm --prefix website run build

Notes

  • This keeps existing action behavior unchanged unless generate-badges: true is provided.

Summary by CodeRabbit

  • New Features

    • Added optional generation of shareable scan result badges during scan runs, with outputs exposing badge URLs.
  • Documentation

    • Added README and website docs with GitHub Actions workflow examples and Shields integration for publishing badge JSON to GitHub Pages.
    • Updated demo image and media entry for CI/CD pipeline illustration.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@fernandotonon has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 34 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 18 minutes and 34 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: af58059b-4c0f-400c-b853-737476b0291d

📥 Commits

Reviewing files that changed from the base of the PR and between eea4d67 and acafa78.

📒 Files selected for processing (1)
  • README.md
📝 Walkthrough

Walkthrough

Badge-generation support was added to the GitHub Action: new inputs/outputs and runtime logic produce Shields-compatible JSON endpoint files from scan results; README and website docs were updated with workflow examples and a CI/CD image reference.

Changes

Cohort / File(s) Summary
Action manifest & runtime
action.yml
Added inputs generate-badges, badge-output-dir, badge-label-prefix, badge-base-url; added outputs for badge URLs and directory; updated composite run logic to capture stdout/stderr, set pipefail, and implement badge-generation flow that extracts metrics (JSON summary or ANSI-stripped text), computes status, writes six JSON badge files, and emits URLs when badge-base-url is provided (skips if jq missing).
README
README.md
Added "Shareable Scan Badges" section with example GitHub Actions workflow invoking scan --json + badge generation, publishing generated badge JSON to gh-pages/badges, and sample Shields markdown links.
Website content & components
website/src/App.jsx, website/src/DocsApp.jsx, website/src/data/content.js
Added media.pipelineCiCd entry and swapped App.jsx demo image; extended DocsApp.jsx with workflow snippet showing generate-badges: true, gh-pages publish example, and Shields badge examples in docs.

Sequence Diagram(s)

sequenceDiagram
  participant Runner as GitHub Actions Runner
  participant Action as qtmesh Action (composite)
  participant Docker as Docker / qtmesh scan
  participant Parser as Badge Generator (jq or text parse)
  participant FS as Filesystem (badge dir)
  participant Pages as gh-pages publisher

  Runner->>Action: start step (inputs incl. generate-badges=true)
  Action->>Docker: run `qtmesh scan` (stdout/stderr captured)
  Docker-->>Action: stdout + stderr
  Action->>Parser: provide captured output
  Parser-->>Action: compute metrics & status
  Action->>FS: write `*-status/errors/warnings/passed/scanned/skipped`.json
  alt badge-base-url provided
    Action->>Runner: set badge URL outputs
    Runner->>Pages: publish `badge-output-dir` to `gh-pages/badges` (separate step)
  end
  Action-->>Runner: set `result`, `exit-code`, and badge outputs
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through logs and parsed the strands,
I stitched small JSON badges with my paws and hands.
Now Shields will sparkle on each repo page,
QtMesh scans wear ribbons, and I take the stage! 🎀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding scan badges support and updating the pipeline overview GIF, which aligns with the primary objectives of this PR.
Description check ✅ Passed The description comprehensively covers the changes with a clear summary, detailed what-changed breakdown, and validation steps, aligning well with the template structure and providing necessary technical context.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/pipeline-badges-release2230-gif

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 880ce93f48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread action.yml Outdated
errors=""
skipped=""

if printf '%s\n' "$OUTPUT" | jq -e '.summary | type == "object"' >/dev/null 2>&1; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle mixed Docker output when parsing badge metrics

The badge parser assumes OUTPUT is pure JSON by running jq against the entire captured stream, but this action captures docker run with 2>&1, so stderr noise (for example image-pull progress on uncached runners) can prepend non-JSON text. In that case this check fails, the code falls back to the text-summary parser, and with --json output it extracts no counts and emits no-data/zero badges even when scan findings exist. This makes badge outputs incorrect in common first-run CI scenarios.

Useful? React with 👍 / 👎.

@sonarqubecloud

Copy link
Copy Markdown

@fernandotonon
fernandotonon merged commit 0d30bb9 into master Apr 13, 2026
2 checks passed
@fernandotonon
fernandotonon deleted the codex/pipeline-badges-release2230-gif branch April 13, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant