Skip to content

Conversation

@kommendorkapten
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 16, 2025 11:59
Copy link

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 refactors the codebase by reorganizing code into separate packages with better separation of concerns. The main changes extract image parsing utilities and controller logic from the main package into dedicated packages.

  • Moved image name and digest extraction functions to a new pkg/image package
  • Relocated controller logic from cmd/deployment-tracker/main.go to a new internal/controller package
  • Updated package references and function calls to use the new package structure

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/image/name.go Adds image name/tag extraction function (moved from deploymentrecord package)
pkg/image/name_test.go Updates package declaration and test function names to match new location
pkg/image/digest.go Adds digest extraction function (extracted from main)
pkg/image/digest_test.go Adds comprehensive test coverage for digest extraction
pkg/deploymentrecord/record.go Removes ExtractImageName function and unused import
internal/controller/controller.go Adds controller implementation (moved from main)
internal/controller/config.go Adds configuration types and constants (moved from main)
cmd/deployment-tracker/main.go Simplified to use new controller package, removes moved logic

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

Copy link

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 refactors the deployment-tracker codebase by reorganizing code into more logical packages and improving separation of concerns. The main changes extract controller logic and image parsing utilities into dedicated packages.

Key changes:

  • Moved controller logic from cmd/deployment-tracker/main.go to new internal/controller package
  • Created new pkg/image package with utilities for parsing image names and digests
  • Moved ExtractImageName function from deploymentrecord package to image package and renamed it to ExtractName

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/image/name.go New file containing ExtractName function moved from deploymentrecord package
pkg/image/name_test.go Updated test file with corrected package name and function references
pkg/image/digest.go New file containing ExtractDigest function extracted from main.go
pkg/image/digest_test.go New test file for ExtractDigest function
pkg/deploymentrecord/record.go Removed ExtractImageName function (moved to image package)
internal/controller/controller.go New file containing controller logic extracted from main.go
internal/controller/config.go New file containing Config type and template constants
cmd/deployment-tracker/main.go Refactored to use new controller package, removed moved code

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

@kommendorkapten kommendorkapten merged commit df605b7 into main Dec 16, 2025
7 checks passed
@kommendorkapten kommendorkapten deleted the refactor branch December 16, 2025 12:11
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.

1 participant