Fix wrong package declarations across 6 view files (copy-paste leftovers)#1001
Open
AdeshDeshmukh wants to merge 1 commit into
Open
Fix wrong package declarations across 6 view files (copy-paste leftovers)#1001AdeshDeshmukh wants to merge 1 commit into
AdeshDeshmukh wants to merge 1 commit into
Conversation
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
Contributor
There was a problem hiding this comment.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a set of copy-paste errors where files were duplicated from other packages but the
packagedeclaration 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/saidpackage registry— clearly carried over frompkg/views/registry/select/view.go. Same story for the others.Whats changing?
pkg/views/artifact/select/view.gopackage registrypackage artifactpkg/views/artifact/tags/select/view.gopackage registrypackage tagspkg/views/repository/select/view.gopackage projectpackage repositorypkg/views/webhook/select/view.gopackage projectpackage webhookpkg/views/label/select/view.gopackage deletepackage labelpkg/views/replication/task/list/view.gopackage viewpackage listCould 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 ./...passesgo vet ./pkg/views/...cleanFixes #2