feat(config): support .sentryclirc config file for per-directory defaults#693
feat(config): support .sentryclirc config file for per-directory defaults#693
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛Dashboard
Other
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
|
Codecov Results 📊✅ 134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 88.74%. Project has 1546 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 95.47% 95.32% -0.15%
==========================================
Files 224 228 +4
Lines 32591 33037 +446
Branches 0 0 —
==========================================
+ Hits 31115 31491 +376
- Misses 1476 1546 +70
- Partials 0 0 —Generated by Codecov Action |
7ca1150 to
e0b746c
Compare
e0b746c to
c0ef499
Compare
c0ef499 to
8d86cbd
Compare
465e9f9 to
519dc5f
Compare
c2f32be to
05d4dae
Compare
05d4dae to
e141d2f
Compare
448efc2 to
ae7499c
Compare
50670a8 to
9653462
Compare
0a10704 to
6148c3f
Compare
1b34396 to
3b880a9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3b880a9. Configure here.
496a257 to
dfe7a29
Compare
…ults Add backward-compatible support for .sentryclirc INI config files. The CLI walks up from CWD to find config files, merging them (closest wins per-field) with ~/.sentryclirc as a global fallback. Supported fields: - [defaults] org, project, url - [auth] token Token and URL are applied via env shim (SENTRY_AUTH_TOKEN, SENTRY_URL). Org and project are inserted into the resolution chain between env vars and SQLite defaults with source tracking. This enables per-directory project defaults in monorepos and seamless migration from legacy sentry-cli.
dfe7a29 to
b380be8
Compare

Summary
.sentryclircINI config file support, matching the legacysentry-cliformat~/.sentryclircas global fallbackSENTRY_AUTH_TOKEN,SENTRY_URL); org/project are inserted directly into the resolution chain with source trackingResolution chain (updated)
Monorepo example
New files
src/lib/ini.tssrc/lib/sentryclirc.tstest/lib/ini.test.tstest/lib/ini.property.test.tstest/lib/sentryclirc.test.tstest/lib/sentryclirc.property.test.tsModified files
src/cli.ts— callapplySentryCliRcEnvShim()early in bootsrc/lib/resolve-target.ts— insert step 3 in all 4 resolution functionsdocs/src/content/docs/configuration.md— new.sentryclircsection with monorepo guidedocs/src/content/docs/features.md— link to resolution priority + tipdocs/src/content/docs/agent-guidance.md— updated auto-detection referencesplugins/sentry-cli/skills/sentry-cli/SKILL.md— regenerated