Repository navigation
Limit sha length - #760
Merged
Merged
Limit sha length#760
Conversation
It's possible to mis-enter a sha, which can lead to hard to interpret behaviour. Cutting this off at the pass to avoid the downstream issues.
cmillar-trunk
requested review from
blx,
gnalh and
localyost3000
as code owners
August 25, 2025 18:12
|
😎 Merged successfully - details. |
gnalh
approved these changes
Aug 25, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #760 +/- ##
==========================================
- Coverage 73.32% 72.96% -0.36%
==========================================
Files 70 72 +2
Lines 16447 17165 +718
==========================================
+ Hits 12060 12525 +465
- Misses 4387 4640 +253 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
blx
approved these changes
Aug 25, 2025
| pub show_failure_messages: bool, | ||
| } | ||
|
|
||
| fn parse_sha(s: &str) -> anyhow::Result<String> { |
Collaborator
There was a problem hiding this comment.
it would be cool to see this parse into a newtype like GitSha that could enforce this invariant ("parse, don't validate" etc). maybe that is excessive in the scope of things here though.
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.
It's possible to mis-enter a sha, which can lead to hard to interpret behaviour. Cutting this off at the pass to avoid the downstream issues.