Repository navigation
fix: a failed check notice shows the end of the output, with short tree paths - #39
Merged
Merged
Conversation
…ee paths The notice of a failed check now replaces the tree paths (PULLGATE_TREE, PULLGATE_OLD_TREE) with NEW and OLD, keeps the last lines of the output (at most 10 lines and 1500 characters), and cuts a long line in the middle, so the reason at the end is shown. Fixes #25 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
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.
Fixes #25
What changes
$PULLGATE_TREE,$PULLGATE_OLD_TREE) in the output withNEWandOLD, before the cut.…between. Before, every line was cut at 100 characters, so the reason at the end was lost.?), HTML-escaped and inside<pre>.Tests
TestCheckNoticeShowsTheReason: a check printsconfig $PULLGATE_TREE/broker.toml: [secret.x] preapprove: is not allowed with ask = "never"with the real tree path. The notice holdsNEW/broker.toml: …and the reason, and not the tree path.TestCheckNoticeKeepsTheLastLine: 60 long lines and a 900-character last line; the notice keeps the start and the end of the last line, shows more than one line, and fits 4096.TestOutputKeepsTheEnd(message): n = 0, empty output, a multibyte line cut in the middle, cleaning and escaping, and output over the limit that keeps its last line.Reviews
Security review: no critical, high or medium findings. Fixed: the cap now counts UTF-16 units, unit tests added, one long doc line wrapped.
Correctness review: no bug found. Added the unit tests it asked for.
🤖 Generated with Claude Code