feat: add --existing-only parameter#7155
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an --existing-only parameter to the updatecli apply and updatecli compose apply commands to enable skipping targets when a pipeline doesn't have an existing remote branch. This allows for advanced scenarios where new updates should not be suggested until existing ones are processed.
Key changes:
- Added
ExistingOnlyfield to target Options struct with documentation - Implemented logic to skip publishing when remote branch doesn't exist and
--existing-onlyis enabled - Added
--existing-onlyCLI flag to bothapplyandcompose applycommands
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| pkg/core/pipeline/target/options.go | Added ExistingOnly field to Options struct with documentation for all fields |
| pkg/core/pipeline/target/main.go | Implemented logic to detect new pipelines and skip publishing when ExistingOnly is enabled |
| cmd/compose_apply.go | Added --existing-only flag definition and wired it to the options |
| cmd/apply.go | Added --existing-only flag definition (but missing the wiring to options) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Olblak <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Olblak <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Olblak <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add an option for
updatecli applyandupdatecli compose applyto only update existing a pipeline.If a pipeline doesn't have a working branch published on the remote git repository then it skipped the target.
The purpose is to allow more advance scenario where we don't want to suggest new update until we finished processing existing ones.
Test
Need to be tested manually
Additional Information
Checklist
Tradeoff
Potential improvement