Skip to content

Conversation

@cardil
Copy link
Member

@cardil cardil commented Jul 4, 2025

/kind bug

Closes #42

@cardil cardil requested a review from Copilot July 4, 2025 18:31
@openshift-ci openshift-ci bot added the kind/bug Something isn't working label Jul 4, 2025
@openshift-ci openshift-ci bot requested review from mvinkler and rudyredhat1 July 4, 2025 18:31
@openshift-ci
Copy link

openshift-ci bot commented Jul 4, 2025

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jul 4, 2025

This comment was marked as outdated.

@cardil cardil added the lgtm label Jul 4, 2025
@cardil cardil force-pushed the bugfix/delete-branch-too-early branch from 2170a3e to 6591ce5 Compare July 4, 2025 18:41
@openshift-ci openshift-ci bot removed the lgtm label Jul 4, 2025
@openshift-ci
Copy link

openshift-ci bot commented Jul 4, 2025

New changes are detected. LGTM label has been removed.

@cardil cardil requested a review from Copilot July 4, 2025 18:42
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

This PR adds an option to skip deleting a branch when pushing, and updates related calls, CLI argument handling, and logging output.

  • Introduces a pushOpt type and skipDeleteOnPush in pushBranch.
  • Propagates the new option through resync_releases and mirror_release.
  • Updates CLI for sync command to accept an optional project directory and silences usage messages; fixes buffer logging to use string(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 ValidArgs list still refers to REPOSITORY but the command now accepts an optional project-dir. Consider updating or removing ValidArgs to reflect the new usage.
		ValidArgs: []string{"REPOSITORY"},

pkg/sync/mirror_release.go:83

  • There isn’t currently a test verifying that skipDeleteOnPush prevents the delete step. Consider adding a unit test for this new behavior.
	if !p.skipDelete {

@cardil cardil added the lgtm label Jul 4, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 532729d into openshift-knative:main Jul 4, 2025
4 checks passed
@cardil cardil deleted the bugfix/delete-branch-too-early branch July 4, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved kind/bug Something isn't working lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant