Skip to content

Conversation

@Anmol1696
Copy link
Collaborator

No description provided.

@Anmol1696 Anmol1696 requested a review from Copilot June 24, 2025 11:17
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

Centralize version retrieval by removing version from user config and always using the generator package’s own version for Kubernetes labels. Updates include a new utility, replacements across templating code, and alignment of tests & snapshots to the new version output.

  • Remove optional version field from StarshipConfig
  • Introduce getGeneratorVersion() and apply it in all label generators
  • Strip version from test fixtures and refresh snapshot labels

Reviewed Changes

Copilot reviewed 205 out of 205 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/types/src/config.ts Dropped version?: string from main config interface
packages/generator/src/version.ts Added utility to read version from package.json
packages/generator/src/helpers.ts Switched commonLabels to call getGeneratorVersion()
packages/generator/src/builders/*.ts All builders now use getGeneratorVersion() for labels
packages/generator/tests/test-utils/config.ts Removed hardcoded version in test inputs
Comments suppressed due to low confidence (3)

packages/packages/types/src/config.ts:247

  • Removing the optional version field from StarshipConfig is a breaking API change—ensure any consumers are updated and document this change in the migration guide.
  name: string;

packages/packages/generator/tests/test-utils/config.ts:8

  • Since version was removed from the config interface, add a unit test for getGeneratorVersion() to verify it returns the expected value, rather than relying on input fixtures.
  name: 'starship-generator-test',

packages/packages/generator/src/builders/cosmos.ts:327

  • [nitpick] Label injection happens inside deep loops—consider caching the result of getGeneratorVersion() to avoid repeated function calls during manifest generation.
              'app.kubernetes.io/version': getGeneratorVersion(),

@Anmol1696 Anmol1696 merged commit 5defeea into main Jun 24, 2025
3 checks passed
@Anmol1696 Anmol1696 deleted the anmol/version-update branch June 24, 2025 11:20
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