Skip to content

Make year and day arguments optional to run all days/years#6

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/add-command-to-run-all-days
Draft

Make year and day arguments optional to run all days/years#6
Copilot wants to merge 6 commits intomainfrom
copilot/add-command-to-run-all-days

Conversation

Copy link
Contributor

Copilot AI commented Dec 6, 2025

Enables running all days from a specific year or all years without requiring explicit arguments. Previously, omitting arguments threw an error.

Changes

  • Made CLI arguments optional: Both year and day now use Args.optional, supporting three modes:

    • No args: runs all years and days
    • Year only: runs all days for that year
    • Year + day: runs specific day (original behavior)
  • Extracted helper functions to eliminate duplication:

    • getAvailableDaysForYear(year): discovers available days
    • runDayWithErrorHandling(year, day): batch execution with error isolation
  • Optimized initialization: years sorted once at startup rather than per execution

Usage

bun run src/bin.ts           # runs all years and days
bun run src/bin.ts 2025      # runs all days from 2025
bun run src/bin.ts 2025 1    # runs day 1 from 2025

Errors in individual days don't halt batch execution—remaining days continue running.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add command to run all days</issue_title>
<issue_description>Command to run all days from a specific year
Command to run all days from all years

Probably best to do this instead of throwing an error if the arguments aren't passed.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits December 6, 2025 14:52
Co-authored-by: Nvveen <486978+Nvveen@users.noreply.github.com>
Co-authored-by: Nvveen <486978+Nvveen@users.noreply.github.com>
Co-authored-by: Nvveen <486978+Nvveen@users.noreply.github.com>
…rmatting

Co-authored-by: Nvveen <486978+Nvveen@users.noreply.github.com>
Copilot AI changed the title [WIP] Add command to run all days from a specified year Make year and day arguments optional to run all days/years Dec 6, 2025
Copilot AI requested a review from Nvveen December 6, 2025 15:01
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.

Add command to run all days

2 participants