Repository navigation
fix(deps-update): put the audit and outdated reports in the PR body - #75
Merged
Merged
Conversation
Both steps wrote their `<<EOF` markers to $GITHUB_OUTPUT but printed the command output to the job log, so the PR body always showed empty blocks (seen on tsvikas/git-fetch-all#28). Redirect the whole group, use `uv run -q` to keep uv's own sync messages out, and strip the ANSI colors that `uv tree --color always` emits. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GyMoD8tx4oz1bpJ1tEL845
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.
The "Security Audit" and "Outdated Packages" blocks in generated projects' dependency-update PRs were always empty, for example tsvikas/git-fetch-all#28. This bug has been there since the workflow was added (48c8908).
Cause
Each step appended its
NAME<<EOF/EOFmarkers to$GITHUB_OUTPUT, but the command between them printed to the job log. In the git-fetch-all run, the log has "Found no known vulnerabilities … in 93 packages" while the PR shows an empty block.Changes
{ echo 'NAME<<EOF'; …; echo 'EOF'; } >> "$GITHUB_OUTPUT", so the output lands between the markers.deps-list-outdatedrunsuv tree --outdated --color always, so the captured output is piped throughsed 's/\x1b\[[0-9;]*m//g'. Without it, the PR body would show raw escape codes. The recipe itself is unchanged, so it stays colored in a terminal.uv run:uv run -q just …keeps uv's own "Downloading … / Installed …" sync messages out.juststill echoes the recipe line (uv audit --locked), which shows which command produced the report.|| trueis gone, because withoutpipefailthe pipeline's exit status issed's. A comment explains this.Verification
Ran the steps' shell locally in a generated project:
sixpinned to 1.16.0 in a scratch project:└── six v1.16.0 (latest: v1.17.0). The raw output contained^[[36m^[[1mescapes, and the captured output has none.I tried
just --quietfirst. It silences the recipe commands' output too, so it's not usable here.🤖 Generated with Claude Code
https://claude.ai/code/session_01GyMoD8tx4oz1bpJ1tEL845