Skip to content

fix(archive): accept 'forever' as a valid --until value#918

Merged
BYK merged 1 commit intomainfrom
byk/fix-cli-1md-forever-until
May 5, 2026
Merged

fix(archive): accept 'forever' as a valid --until value#918
BYK merged 1 commit intomainfrom
byk/fix-cli-1md-forever-until

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented May 5, 2026

Summary

Fixes CLI-1MD: users passing --until forever to sentry issue archive received a ValidationError. Since omitting --until already archives forever, forever is a natural and discoverable alias.

Changes

  • Adds { kind: "forever" } to the UntilSpec union
  • Recognizes "forever" (case-insensitive) in parseUntilSpec
  • Maps { kind: "forever" } to { substatus: "archived_forever" } in specToApiOptions — identical to the no---until path
  • Adds forever to the --until flag brief and the unrecognized-value error hint
  • Adds 3 tests: parseUntilSpec("forever"), parseUntilSpec("Forever") (case-insensitive), and a func() integration test

Before / After

# Before
$ sentry issue archive CLI-1MD --until forever
ValidationError: invalid --until value: 'forever'

# After
$ sentry issue archive CLI-1MD --until forever
# Archives forever — same as omitting --until

Users passing --until forever got a ValidationError. Since omitting
--until already archives forever, 'forever' is a natural alias.

Adds forever as a recognized keyword in parseUntilSpec (case-insensitive),
maps it to archived_forever in specToApiOptions, and documents it in the
flag brief and error hint text.

Fixes CLI-1MD
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

PR Preview Action v1.8.1

QR code for preview link

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Codecov Results 📊

6681 passed | Total: 6681 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +3
Passed Tests 📈 +3
Failed Tests
Skipped Tests

All tests are passing successfully.

❌ Patch coverage is 77.78%. Project has 13823 uncovered lines.
❌ Project coverage is 76.28%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
src/commands/issue/archive.ts 77.78% ⚠️ 2 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    76.69%    76.28%    -0.41%
==========================================
  Files          303       303         —
  Lines        57961     58282      +321
  Branches         0         0         —
==========================================
+ Hits         44453     44459        +6
- Misses       13508     13823      +315
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK merged commit 3d6dc61 into main May 5, 2026
24 checks passed
@BYK BYK deleted the byk/fix-cli-1md-forever-until branch May 5, 2026 16:14
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