Skip to content

Limit sha length - #760

Merged
trunk-io[bot] merged 1 commit into
mainfrom
christian/limit-sha-length
Aug 25, 2025
Merged

trunk-io[bot] merged 1 commit into
mainfrom
christian/limit-sha-length

Conversation

@cmillar-trunk

Copy link
Copy Markdown
Contributor

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.

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.
@trunk-io

trunk-io Bot commented Aug 25, 2025 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.23077% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.96%. Comparing base (e460697) to head (5cc15a2).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
cli/src/upload_command.rs 0.00% 8 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread cli/src/upload_command.rs
pub show_failure_messages: bool,
}

fn parse_sha(s: &str) -> anyhow::Result<String> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@trunk-io
trunk-io Bot merged commit 97bb80e into main Aug 25, 2025
@trunk-staging-io

trunk-staging-io Bot commented Aug 25, 2025 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

@trunk-io

trunk-io Bot commented Aug 25, 2025 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants