feat(issue): replace individual archive flags with unified --until#898
Merged
feat(issue): replace individual archive flags with unified --until#898
Conversation
Replace --until-escalating, --duration, --count, --window, --users, --user-window with a single --until flag that accepts a compact grammar: --until auto Sentry's smart escalation detection --until 30m / 1h / 7d Duration (reuses parsePeriod units) --until 2026-05-15 Absolute date (computed as delta) --until 10x Event count threshold --until 10u User count threshold --until 10x/5m Count within time window --until 10events/2hours Verbose form Supports both terse (x/u/m/h/d) and verbose (events/users/minutes/hours) suffixes. 'auto' and 'escalating' are both accepted as keywords. Exports UNIT_SECONDS and parseRelativeParts from time-range.ts for reuse.
Contributor
|
Contributor
Codecov Results 📊✅ 6492 passed | Total: 6492 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 89.55%. Project has 13304 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 75.95% 75.98% +0.03%
==========================================
Files 295 295 —
Lines 55246 55390 +144
Branches 0 0 —
==========================================
+ Hits 41958 42086 +128
- Misses 13288 13304 +16
- Partials 0 0 —Generated by Codecov Action |
- Expand fullDescription with mode explanations, time format reference, compound condition syntax, and 9 commented examples - Fix stale --duration 60 example in issue route map → --until auto - Add full 'Archive and ignore issues' section to docs fragment with syntax reference table - Skill reference auto-regenerated with all new examples
Bugbot correctly identified that the default branch masked TypeScript's exhaustive discriminated-union checking. A new UntilSpec variant would silently fall through to archived_forever instead of causing a compile error. Now uses const _exhaustive: never = spec for compile-time safety.
Contributor
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 fc37c05. Configure here.
Empty string from shell variable expansion (--until "$EMPTY_VAR") now correctly hits the parser and errors instead of silently archiving forever.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Replaces the 6 individual archive condition flags with a single
--untilflag that accepts a compact, intuitive grammar.Before (6 flags)
After (1 flag)
Grammar
auto/escalatingarchived_until_escalating30m,1h,7dignoreDuration(in minutes)2026-05-15ignoreDuration10x/10eventsignoreCount10u/10usersignoreUserCount10x/5mignoreCount+ignoreWindow10users/2hoursarchived_foreverBoth terse (
x,u,m,h,d) and verbose (events,users,minutes,hours,days) suffixes are supported.Implementation
parseUntilSpec()exported for testability — parses raw string into discriminated unionUntilSpecspecToApiOptions()converts to API parameters (substatus+statusDetails)parseRelativePartsandUNIT_SECONDSfromsrc/lib/time-range.ts(newly exported)Tests
31 tests: 25 unit tests for
parseUntilSpeccovering all forms + edge cases (zero counts, negative counts, past dates, invalid formats, wrong slash order), plus 6 integration tests for the command func.