Skip to content

refactor(profile): replace --org/--project flags with positional args#204

Closed
BYK wants to merge 1 commit intofeat/profile-commandfrom
refactor/positional-args-flags
Closed

refactor(profile): replace --org/--project flags with positional args#204
BYK wants to merge 1 commit intofeat/profile-commandfrom
refactor/positional-args-flags

Conversation

@BYK
Copy link
Member

@BYK BYK commented Feb 5, 2026

Summary

  • Migrate profile view command from --org/--project flags to <org>/<project> positional argument syntax
  • Add unit tests for positional arg parsing

Motivation

Ensures consistency with other commands. The <org>/<project> syntax is more concise and follows gh CLI conventions.

Changes

Command updated:

  • sentry profile view [<org>/<project>] <transaction> - now takes optional positional target

Related

Testing

  • All tests pass
  • Typecheck passes
  • Lint passes

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Dsn

  • Infer project from directory name when DSN detection fails by BYK in #178
  • Add project root detection for automatic DSN discovery by BYK in #159

Other

  • (issue) Replace --org/--project flags with /ID syntax by BYK in #161
  • (lib) Add anyTrue helper for parallel-with-early-exit pattern by BYK in #174
  • (profile) Add profile command to surface CPU profiling data by BYK in #187
  • (telemetry) Add withTracing helper to reduce Sentry span boilerplate by BYK in #172

Bug Fixes 🐛

  • (types) Align schema types with Sentry API by betegon in #169
  • ParseIssueArg now checks slashes before dashes by BYK in #177
  • Address bugbot review comments on dsn-cache model-based tests by BYK in #176
  • Added nullable in substatus's zod validation by MathurAditya724 in #157

Internal Changes 🔧

  • (profile) Replace --org/--project flags with positional args by BYK in #204
  • (upgrade) Use centralized user-agent for GitHub API requests by BYK in #173

Other

  • test: simplify issue-id tests covered by property tests by BYK in #183
  • test: simplify alias and arg-parsing tests covered by property tests by BYK in #182
  • test: add property tests for API command and human formatters by BYK in #181
  • test: remove redundant DB tests covered by model-based tests by BYK in #180
  • test: add property tests for async utilities (Phase 4) by BYK in #179
  • test: add model-based tests for DSN and project cache by BYK in #171
  • test: add model-based and property-based testing with fast-check by BYK in #166

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/pr-preview/pr-204/

Built to branch gh-pages at 2026-02-05 22:19 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Codecov Results 📊

❌ Patch coverage is 25.24%. Project has 2854 uncovered lines.
❌ Project coverage is 66.91%. Comparing base (base) to head (head).

Files with missing lines (42)
File Patch % Lines
human.ts 31.80% ⚠️ 684 Missing
resolve-target.ts 15.28% ⚠️ 366 Missing
oauth.ts 25.10% ⚠️ 194 Missing
api-client.ts 68.31% ⚠️ 193 Missing
view.ts 31.69% ⚠️ 166 Missing
upgrade.ts 40.23% ⚠️ 153 Missing
profile.ts 5.48% ⚠️ 138 Missing
analyzer.ts 3.05% ⚠️ 127 Missing
resolver.ts 3.23% ⚠️ 120 Missing
errors.ts 5.94% ⚠️ 95 Missing
migration.ts 47.44% ⚠️ 82 Missing
browser.ts 4.11% ⚠️ 70 Missing
version-check.ts 34.04% ⚠️ 62 Missing
telemetry.ts 77.43% ⚠️ 51 Missing
api.ts 89.80% ⚠️ 47 Missing
seer.ts 75.54% ⚠️ 45 Missing
preload.ts 38.71% ⚠️ 38 Missing
seer.ts 79.87% ⚠️ 30 Missing
schema.ts 54.10% ⚠️ 28 Missing
utils.ts 87.43% ⚠️ 24 Missing
detector.ts 90.10% ⚠️ 20 Missing
output.ts 15.00% ⚠️ 17 Missing
code-scanner.ts 95.00% ⚠️ 16 Missing
sentry-urls.ts 63.89% ⚠️ 13 Missing
dsn-cache.ts 94.62% ⚠️ 12 Missing
qrcode.ts 33.33% ⚠️ 10 Missing
fs-utils.ts 57.14% ⚠️ 9 Missing
project-root.ts 97.73% ⚠️ 7 Missing
feedback.ts 84.21% ⚠️ 6 Missing
auth.ts 95.52% ⚠️ 6 Missing
upgrade.ts 93.83% ⚠️ 5 Missing
colors.ts 91.84% ⚠️ 4 Missing
env-file.ts 97.58% ⚠️ 3 Missing
project-aliases.ts 97.40% ⚠️ 2 Missing
project-root-cache.ts 96.92% ⚠️ 2 Missing
transaction-aliases.ts 98.15% ⚠️ 2 Missing
json.ts 33.33% ⚠️ 2 Missing
alias.ts 99.28% ⚠️ 1 Missing
parser.ts 98.63% ⚠️ 1 Missing
resolve-transaction.ts 98.96% ⚠️ 1 Missing
helpers.ts 94.74% ⚠️ 1 Missing
helpers.ts 94.74% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    77.99%    66.91%   -11.08%
==========================================
  Files           58        67        +9
  Lines         7933      8624      +691
  Branches         0         0         —
==========================================
+ Hits          6187      5770      -417
- Misses        1746      2854     +1108
- Partials         0         0         —

Generated by Codecov Action

Migrate profile view command from --org/--project flags to use the
<org>/<project> positional argument syntax for consistency with other commands.

Changes:
- profile view now uses: sentry profile view [<org>/<project>] <transaction>
- Export parsePositionalArgs for unit testing
- Add unit tests for parsePositionalArgs
- Regenerate SKILL.md
@BYK BYK force-pushed the refactor/positional-args-flags branch from 575b879 to f1484dd Compare February 5, 2026 22:31
@BYK BYK changed the title refactor(commands): replace --org/--project flags with positional args refactor(profile): replace --org/--project flags with positional args Feb 5, 2026
BYK added a commit that referenced this pull request Feb 9, 2026
Cherry-pick from refactor/positional-args-flags branch (PR #204).
Migrate profile view command from --org/--project flags to use the
<org>/<project> positional argument syntax for consistency with other commands.

Changes:
- profile view now uses: sentry profile view [<org>/<project>] <transaction>
- Export parsePositionalArgs for unit testing
- Add unit tests for parsePositionalArgs

Co-authored-by: Burak Yigit Kaya <byk@sentry.io>
@BYK
Copy link
Member Author

BYK commented Feb 9, 2026

Closing in favor of PR #187.

The changes from this PR have been cherry-picked into the main profile command PR (#187), which includes additional fixes:

  • Consistent default periods between profile list and profile view (24h)
  • Duplicate segment alias disambiguation with numeric suffixes
  • --web/-w flag for profile list
  • Schema repair fix for transaction_aliases table

See commit cb96897 in #187.

@BYK BYK closed this Feb 9, 2026
@BYK BYK deleted the refactor/positional-args-flags branch February 9, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant