feat(ci): persist pyscn analyze report and post PR comment - #25
Merged
Conversation
Add pyscn analyze --html report generation + upload-artifact so full reports survive past the job. On pull_request runs (same-repo only, so forked-PR tokens don't hit a permissions error), pipe the JSON report through jq into a PR comment via gh. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HL1T9zdfnCg1dcTcDfDRSt
pyscn report
|
…kflow Move the pyscn check/report/upload/comment steps out of tests.yml's lint job into a new quality.yml workflow, gated on pull_request/push paths (py files, .pyscn.toml, pyproject.toml) per pyscn's own CI docs example. Keeps the analysis from running on PRs/pushes that touch no Python, without skipping unrelated lint/test/build jobs too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HL1T9zdfnCg1dcTcDfDRSt
dlstadther
commented
Sep 12, 2026
master/develop don't exist in this repo — trunk is main. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HL1T9zdfnCg1dcTcDfDRSt
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.
Summary
.github/workflows/quality.ymlruns pyscn's whole quality-analysis flow (check gate,analyze --htmlreport, artifact upload, PR comment) as its own workflow, gated onpaths: ['**/*.py', '.pyscn.toml', 'pyproject.toml']for bothpull_requestandpush— so it's skipped entirely on PRs/pushes that touch no Python (per docs.codescan.dev/integrations/ci-cd/#github-actions).pull_requestruns from the same repo (skips forked PRs, whoseGITHUB_TOKENcan't post comments), pipepyscn analyze --json --output -throughjqinto a markdown summary and post it viagh pr comment(per docs.codescan.dev/integrations/ci-cd/#pr-comment-from-json).tests.yml'slintjob (now back to just Ruff + Sqlfluff) since they moved toquality.yml.lint-quality-reportMakefile target so the report can also be generated locally.pushtrigger targetsmain(repo's actual trunk branch, notmaster/develop).Test plan
make lint-quality-reportruns locally and produces.pyscn/reports/*.htmlpyscn analyze --json --output - . | jq -r '...'produces the expected markdown summaryyaml.safe_loadqualityworkflow triggered, posted the pyscn report comment🤖 Generated with Claude Code
https://claude.ai/code/session_01HL1T9zdfnCg1dcTcDfDRSt