-
Notifications
You must be signed in to change notification settings - Fork 2
🐛 Don't delete branch twice #55
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
🐛 Don't delete branch twice #55
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cardil The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
2170a3e to
6591ce5
Compare
|
New changes are detected. LGTM label has been removed. |
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 adds an option to skip deleting a branch when pushing, and updates related calls, CLI argument handling, and logging output.
- Introduces a
pushOpttype andskipDeleteOnPushinpushBranch. - Propagates the new option through
resync_releasesandmirror_release. - Updates CLI for
synccommand to accept an optional project directory and silences usage messages; fixes buffer logging to usestring(buff).
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/sync/sync_release_next.go | Added pushOpt, skipDeleteOnPush, and updated pushBranch signature |
| pkg/sync/resync_releases.go | Passed skipDeleteOnPush into pushBranch |
| pkg/sync/mirror_release.go | Added skipDelete flag and conditional delete step |
| pkg/sync/create_pr.go | Changed buffer print to string(buff) |
| internal/cmd/sync.go | Made project-dir an optional argument and updated Use/Args |
| internal/cmd/root.go | Set SilenceUsage = true in a persistent pre-run hook |
Comments suppressed due to low confidence (2)
internal/cmd/sync.go:20
- The
ValidArgslist still refers toREPOSITORYbut the command now accepts an optionalproject-dir. Consider updating or removingValidArgsto reflect the new usage.
ValidArgs: []string{"REPOSITORY"},
pkg/sync/mirror_release.go:83
- There isn’t currently a test verifying that
skipDeleteOnPushprevents the delete step. Consider adding a unit test for this new behavior.
if !p.skipDelete {
532729d
into
openshift-knative:main
/kind bug
Closes #42