feat: Project tasks support reference object#240
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a new reference object in project tasks and schedulers to replace the deprecated branch field, improving API design and providing better support for different reference types like tags. The implementation maintains backward compatibility by automatically converting between the old branch field and the new reference object during JSON marshaling/unmarshaling.
Key changes:
- Introduced new
Referencestruct withTypeandNamefields - Added custom JSON marshaling/unmarshaling for
TaskandSchedulerstructs to handle backward compatibility - Implemented automatic conversion between
branchfield andreferenceobject based on branch format (detects tag references)
Reviewed Changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| api/models/project_v1_alpha.go | Core implementation of Reference struct and backward-compatible marshaling logic for Task and Scheduler |
| cmd/edit_test.go | Comprehensive test coverage for new reference functionality and backward compatibility scenarios |
| api/models/debug_job_v1_alpha.go | Minor style improvement removing unnecessary parentheses from function return type |
| cmd/create_secret_test.go | Cleanup of extra whitespace lines |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 7 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.