Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- (snapshots) Reject snapshot uploads that have a PR number but no base SHA, since comparisons cannot work without a base reference ([#3300](https://github.com/getsentry/sentry-cli/pull/3300))

## 3.4.2

### Fixes
Expand Down
8 changes: 8 additions & 0 deletions src/commands/build/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
// Always collect git metadata, but only perform automatic inference when enabled
let vcs_info = collect_git_metadata(matches, &config, should_collect_git_metadata);

if vcs_info.pr_number.is_some() && vcs_info.base_sha.is_none() {
anyhow::bail!(
"A PR number was provided but no base SHA could be determined. \
Snapshot comparisons require a base SHA to identify the base build. \
Pass --base-sha explicitly or ensure your CI environment exposes the merge base."
);
}
Comment thread
NicoHinderling marked this conversation as resolved.

debug!("Scanning for images in: {}", dir_path.display());
debug!("Organization: {org}");
debug!("Project: {project}");
Expand Down
Loading