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 🐛
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 86.18%. Project has 1508 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 95.44% 95.40% -0.04%
==========================================
Files 224 226 +2
Lines 32538 32754 +216
Branches 0 0 —
==========================================
+ Hits 31052 31246 +194
- Misses 1486 1508 +22
- Partials 0 0 —Generated by Codecov Action |
7ca1150 to
e0b746c
Compare
e0b746c to
c0ef499
Compare
c0ef499 to
8d86cbd
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 8d86cbd. Configure here.
…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.
8d86cbd to
465e9f9
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