feat: add report input to generate a maturity report - #12
Closed
shenxianpeng wants to merge 1 commit into
Closed
Conversation
When `report: true`, the action renders a human-readable maturity report (score, level, per-category breakdown, and improvement recommendations) into the GitHub Actions job summary, so it shows up on the run page. - New `report` input (default `false`). - New `report-path` output pointing at a Markdown copy of the report, written to RUNNER_TEMP (outside the repo, so it is never committed to the badge PR) for optional upload as an artifact. - Reuses the existing `dm config --format json` output (score, level, category_scores, passed/failed) — no extra CLI call beyond persisting the JSON the assessment step already produced. - README: document the input/output and a Reports section with examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
reportinput. When set totrue, the action generates a human-readable DevOps maturity report and writes it to the GitHub Actions job summary, so it renders right on the workflow run page.The report includes the overall score & level, a per-category breakdown (with a little bar), the met criteria, and the unmet ones with their improvement recommendations.
How
reportinput, default'false'— fully backward compatible; existing workflows are unaffected.dm config --format json; it now also persists that JSON to$RUNNER_TEMP. A new optional step (if: inputs.report == 'true') reads it and builds the Markdown from the CLI's existing fields (score,level,category_scores,passed,failed) — no extra CLI invocation, no new dependency.report-pathoutput points at a Markdown copy of the report, written to$RUNNER_TEMP(outside the repo, so it's never committed to the badge PR) for optional artifact upload.upload-artifact).Example output
Validation
action.ymlpasses the repo's CI check (yaml.safe_load+ required keys + composite).py_compiles cleanly and was smoke-tested against a representativedm config --format jsonpayload (output shown above).🤖 Generated with Claude Code
Generated by Claude Code