Skip to content

Add --from and --to time range flags#6

Merged
wham merged 4 commits intomainfrom
copilot/add-time-range-support
Feb 23, 2026
Merged

Add --from and --to time range flags#6
wham merged 4 commits intomainfrom
copilot/add-time-range-support

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

Users had no way to bound a dump to a specific time window, requiring full channel/thread exports even when only a slice of history was needed.

Changes

  • main.go: Registers --from and --to string flags; adds parseTime helper accepting RFC3339 or YYYY-MM-DD; replaces sd.DumpAll() with sd.Dump(ctx, link, oldest, latest) — zero time.Time{} when a flag is omitted preserves existing unbounded behaviour
  • main_test.go: TestParseTime covers empty input, RFC3339, date-only, and invalid formats
  • README.md / cobra Long/Example: Documented new flags

Usage

# Date-only bounds
gh slackdump --from 2024-01-01 --to 2024-01-31 https://myworkspace.slack.com/archives/C09036MGFJ4

# Precise RFC3339 bounds
gh slackdump --from 2024-01-15T09:00:00Z --to 2024-01-15T17:00:00Z https://myworkspace.slack.com/archives/C09036MGFJ4

# Either flag is optional; omitting both dumps everything (unchanged behaviour)
Original prompt

Add support for specifying a time range for the Slack dump in the repository wham/gh-slackdump. This should allow the user to define a start and end time for the dump process, enabling them to extract messages only within the specified range.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: wham <448809+wham@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for specifying time range for Slack dump Add --from and --to time range flags Feb 22, 2026
@wham wham marked this pull request as ready for review February 23, 2026 06:35
@wham wham merged commit 1f1bd9f into main Feb 23, 2026
1 check passed
@wham wham deleted the copilot/add-time-range-support branch February 23, 2026 06:35
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.

2 participants