Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5cba6fa
feat(build): Add --git-metadata flag with CI auto-detection (EME-604)
runningcode Nov 20, 2025
66bbc18
test: Update help snapshots and add changelog entry
runningcode Nov 21, 2025
c942687
refactor(ci): Align CI detection with sentry-android-gradle-plugin
runningcode Nov 21, 2025
828d7ee
refactor(build): Simplify git metadata collection code (EME-604)
runningcode Nov 25, 2025
189e496
test: Remove --no-git-metadata from help output test (EME-604)
runningcode Nov 25, 2025
c06716d
test: Fix help text expectation for git-metadata flag (EME-604)
runningcode Nov 25, 2025
8d65e72
fix(build): Respect explicit git metadata flags with --git-metadata=f…
runningcode Nov 26, 2025
ae77710
refactor(build): Move make_command function to reduce diff (EME-604)
runningcode Nov 26, 2025
1d3adf8
refactor(build): Move execute function to reduce diff (EME-604)
runningcode Nov 26, 2025
4033b61
refactor(build): Move GitMetadata struct before execute function (EME…
runningcode Nov 26, 2025
59064f0
test(build): Combine redundant git metadata tests (EME-604)
runningcode Nov 26, 2025
2fdd846
fix(test): Use in-memory config for git metadata tests (EME-604)
runningcode Dec 2, 2025
a2e355f
refactor(build): Rename --git-metadata to --force-git-metadata (EME-604)
runningcode Dec 2, 2025
3867313
Use bool::then
runningcode Dec 2, 2025
1d4a482
chore: Run cargo fmt
runningcode Dec 2, 2025
584b829
refactor(build): Replace GitMetadata with VcsInfo to eliminate duplic…
runningcode Dec 2, 2025
65b5e5b
refactor(build): Use --force-git-metadata and --no-git-metadata flags…
runningcode Dec 2, 2025
06b2d4d
docs(changelog): Move git metadata flags entry to Improvements (EME-604)
runningcode Dec 2, 2025
6377fab
fix(build): Use str::is_empty for Cow<str> serialization (EME-604)
runningcode Dec 2, 2025
003ff04
refactor(build): Simplify collect_git_metadata string handling (EME-604)
runningcode Dec 2, 2025
e736942
Update CHANGELOG.md
runningcode Dec 3, 2025
3b07dcb
Update boolean
runningcode Dec 3, 2025
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

### Improvements

- Add `--force-git-metadata` and `--no-git-metadata` flags with CI auto-detection to `sentry-cli build upload` command ([#2974](https://github.com/getsentry/sentry-cli/pull/2974))
- Git metadata is now automatically collected only when running in most CI environments (GitHub Actions, GitLab CI, Jenkins, etc.)
- Local development builds no longer trigger GitHub status checks by default
- Users can force enable with `--force-git-metadata` or disable with `--no-git-metadata`
- The `sentry-cli build upload` command now automatically detects the correct branch or tag reference in non-PR GitHub Actions workflows ([#2976](https://github.com/getsentry/sentry-cli/pull/2976)). Previously, `--head-ref` was only auto-detected for pull request workflows. Now it works for push, release, and other workflow types by using the `GITHUB_REF_NAME` environment variable.

## 2.58.2
Expand Down
12 changes: 7 additions & 5 deletions src/api/data_types/chunking/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::borrow::Cow;

use serde::{Deserialize, Serialize};
use sha1_smol::Digest;

Expand Down Expand Up @@ -32,15 +34,15 @@ pub struct VcsInfo<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
pub base_sha: Option<Digest>,
#[serde(skip_serializing_if = "str::is_empty", rename = "provider")]
pub vcs_provider: &'a str,
pub vcs_provider: Cow<'a, str>,
#[serde(skip_serializing_if = "str::is_empty")]
pub head_repo_name: &'a str,
pub head_repo_name: Cow<'a, str>,
#[serde(skip_serializing_if = "str::is_empty")]
pub base_repo_name: &'a str,
pub base_repo_name: Cow<'a, str>,
#[serde(skip_serializing_if = "str::is_empty")]
pub head_ref: &'a str,
pub head_ref: Cow<'a, str>,
#[serde(skip_serializing_if = "str::is_empty")]
pub base_ref: &'a str,
pub base_ref: Cow<'a, str>,
#[serde(skip_serializing_if = "Option::is_none")]
pub pr_number: Option<u32>,
}
Loading