Skip to content

Conversation

@dkhalife
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 10, 2025 16:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for an optional end date on recurring tasks so no further due dates are scheduled past the specified end date.

  • Introduce EndDate field in the Task model and API layer.
  • Update ScheduleNextDueDate to return nil when the next due date would exceed EndDate.
  • Add tests for creating tasks with an end date and for enforcing end-date restrictions in scheduling.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
internal/repos/task/task_test.go New tests for creating tasks with end dates and scheduling
internal/repos/task/task.go ScheduleNextDueDate updated to handle EndDate logic
internal/models/task.go Added EndDate field to Task struct
internal/apis/task.go API handlers and TaskReq updated to parse and include EndDate
Comments suppressed due to low confidence (1)

internal/apis/task.go:132

  • New behavior for parsing and validating EndDate in the API layer isn't covered by unit tests; add tests for both successful parsing and error cases in createTask and editTask.
var endDate *time.Time

@codecov
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

Attention: Patch coverage is 10.34483% with 26 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/apis/task.go 0.00% 26 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dkhalife dkhalife merged commit 6e46474 into main Jun 10, 2025
4 of 5 checks passed
@dkhalife dkhalife deleted the recurrence_end_date branch June 10, 2025 16:32
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