Skip to content

Fix wrong package declarations across 6 view files (copy-paste leftovers)#1001

Open
AdeshDeshmukh wants to merge 1 commit into
goharbor:mainfrom
AdeshDeshmukh:fix/wrong-package-declarations
Open

Fix wrong package declarations across 6 view files (copy-paste leftovers)#1001
AdeshDeshmukh wants to merge 1 commit into
goharbor:mainfrom
AdeshDeshmukh:fix/wrong-package-declarations

Conversation

@AdeshDeshmukh

Copy link
Copy Markdown

This fixes a set of copy-paste errors where files were duplicated from other packages but the package declaration was never updated to match their actual location.

Whats wrong?

Six files declare a package name that has nothing to do with where they live. For example, a file inside artifact/select/ said package registry — clearly carried over from pkg/views/registry/select/view.go. Same story for the others.

Whats changing?

File Was Now
pkg/views/artifact/select/view.go package registry package artifact
pkg/views/artifact/tags/select/view.go package registry package tags
pkg/views/repository/select/view.go package project package repository
pkg/views/webhook/select/view.go package project package webhook
pkg/views/label/select/view.go package delete package label
pkg/views/replication/task/list/view.go package view package list

Could this break anything?

No. Every single one of these files is imported with an explicit Go alias (aview "...", tview "...", etc.), so the declared package name is completely irrelevant at the call site. Zero callers touch, zero tests change.

Verification

  • go build ./... passes
  • go vet ./pkg/views/... clean
  • All 7 test suites across 103 packages pass

Fixes #2

Fixes copy-paste errors where wrong package names were left behind
when files were duplicated from other directories.

- artifact/select/view.go: registry -> artifact
- artifact/tags/select/view.go: registry -> tags
- repository/select/view.go: project -> repository
- webhook/select/view.go: project -> webhook
- label/select/view.go: delete -> label
- replication/task/list/view.go: view -> list

No caller changes needed — all imports use explicit aliases.

Signed-off-by: Adesh Deshmukh <adeshkd123@gmail.com>

Fixes goharbor#2
Copilot AI review requested due to automatic review settings June 15, 2026 19:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates Go package declarations in several views/*/*/view.go files to better reflect their feature area rather than legacy/incorrect package names.

Changes:

  • Rename package clauses from generic/incorrect names (e.g., project, registry, delete, view) to feature-oriented names (e.g., webhook, repository, artifact).
  • Align replication task list view package name with its directory (list).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pkg/views/webhook/select/view.go Updates package name to webhook
pkg/views/repository/select/view.go Updates package name to repository
pkg/views/replication/task/list/view.go Updates package name to list
pkg/views/label/select/view.go Updates package name to label
pkg/views/artifact/tags/select/view.go Updates package name to tags
pkg/views/artifact/select/view.go Updates package name to artifact

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// See the License for the specific language governing permissions and
// limitations under the License.
package project
package webhook
// See the License for the specific language governing permissions and
// limitations under the License.
package project
package repository
// See the License for the specific language governing permissions and
// limitations under the License.
package delete
package label
// See the License for the specific language governing permissions and
// limitations under the License.
package registry
package artifact
// See the License for the specific language governing permissions and
// limitations under the License.
package registry
package tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants