-
Notifications
You must be signed in to change notification settings - Fork 0
Link a Pomodoro to an Activity #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I created a one-to-many relationship between Activity and Pomodoro. I updated the `pomorodo start` command to accept an activity ID either as a positional argument or by reading the activity ID from stdin. Reading from stdin allows for command line chaining where a previous command can output an activity ID and it can be piped into the `pomodoro start` command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR establishes a one-to-many relationship between Activity and Pomodoro entities, allowing pomodoros to be linked to specific activities. The changes enable the pomodoro start command to accept an activity ID either as a command-line argument or via stdin for command chaining scenarios.
- Added ActivityID field to Pomodoro model with database indexing
- Updated
pomodoro startcommand to accept activity ID parameter with stdin fallback - Modified
activity addcommand to output the created activity ID for chaining
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| internal/database/pomodoro.go | Added ActivityID field to establish relationship with Activity |
| internal/database/activity.go | Added Pomodoros slice to complete the bidirectional relationship |
| internal/cli/pomodoro/start_command.go | Enhanced start command to accept activity ID and read from stdin |
| internal/cli/activity/add_command.go | Modified to output activity ID for command chaining |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
🐳 Container Image BuiltYour PR container image has been built and published: Supported architectures: linux/amd64, linux/arm64 Usage: docker run --rm ghcr.io/nakedsoftware/time:pr-46 --help
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Based on feedback from the Copilot code review, I increased the timeout for waiting for the activity ID on stdin to 1 second.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
🐳 Container Image BuiltYour PR container image has been built and published: Supported architectures: linux/amd64, linux/arm64 Usage: docker run --rm ghcr.io/nakedsoftware/time:pr-46 --help
|
1 similar comment
🐳 Container Image BuiltYour PR container image has been built and published: Supported architectures: linux/amd64, linux/arm64 Usage: docker run --rm ghcr.io/nakedsoftware/time:pr-46 --help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
🐳 Container Image BuiltYour PR container image has been built and published: Supported architectures: linux/amd64, linux/arm64 Usage: docker run --rm ghcr.io/nakedsoftware/time:pr-46 --help
|
I created a one-to-many relationship between Activity and Pomodoro. I updated the
pomorodo startcommand to accept an activity ID either as a positional argument or by reading the activity ID from stdin. Reading from stdin allows for command line chaining where a previous command can output an activity ID and it can be piped into thepomodoro startcommand.Closes #39