Switch created-* filters to human-readable timestamps#24
Open
Switch created-* filters to human-readable timestamps#24
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request switches timestamp filter flags from Unix epoch values to human-readable date strings, aligning with the honeybadger-mcp-server conventions. It updates the deployments list, uptime outages, and uptime checks commands to accept --created-after and --created-before flags in YYYY-MM-DD or RFC3339 format. A new shared helper function parseTimeFlag provides consistent time parsing with clear error messages across all affected commands.
Changes:
- Replaced Unix epoch (int64) timestamp flags with human-readable string timestamps for created-after/created-before filters
- Added
parseTimeFlaghelper function supporting RFC3339, date-only (YYYY-MM-DD), and datetime without zone formats - Updated api-go dependency to v0.4.1-0.20260218211314-b4dfa5f13e9b to support time.Time instead of int64 for timestamp filters
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updated api-go dependency to pre-release version supporting time.Time timestamp filters |
| go.sum | Added checksums for new api-go dependency version |
| cmd/root.go | Added parseTimeFlag helper function for parsing user-provided timestamps in multiple formats |
| cmd/deployments.go | Changed created-after/created-before flags from int64 to string, added parsing logic |
| cmd/uptime.go | Changed created-after/created-before flags from int64 to string for both outages and checks commands |
| cmd/dataapi_test.go | Added integration tests verifying timestamp conversion and empty timestamp handling for deployments |
| cmd/uptime_test.go | Added integration tests verifying timestamp conversion and empty timestamp handling for outages and checks |
| CHANGELOG.md | Documented breaking change for timestamp flag format requirements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- G704 (SSRF): endpoint URL is intentionally user-configurable - G101 (hardcoded credentials): test fixture data, not real secrets Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests RFC3339, date-only, datetime without zone, and error cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move //nolint:gosec from field lines to struct literal opening braces, which is where G101 is actually reported. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pin same version as CI to catch lint issues locally. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
This aligns timestamp handling with
honeybadger-mcp-serverand handles the changes in honeybadger-io/api-go#6.Summary
deployments list,uptime outages, anduptime checksto accept human-readable--created-after/--created-beforevalues (YYYY-MM-DDor RFC3339).Breaking change
--created-after/--created-beforeon these commands.