Skip to content

releaser: Add Vitest coverage for utility functions#801

Open
skools-here wants to merge 15 commits into
headlamp-k8s:mainfrom
skools-here:releaser-utils-vitest-coverage
Open

releaser: Add Vitest coverage for utility functions#801
skools-here wants to merge 15 commits into
headlamp-k8s:mainfrom
skools-here:releaser-utils-vitest-coverage

Conversation

@skools-here

Copy link
Copy Markdown

Summary

Adds Vitest test coverage for the releaser utility modules.

fixes : #798

Changes

  • Add tests for ArtifactHub utilities (artifacthub.ts)
  • Add tests for Git utilities (git.ts)
  • Add tests for GitHub utilities (github.ts)
  • Add tests for plugin utilities (plugin.ts)
  • Add tests for version utilities (version.ts)
  • Add Vitest coverage configuration

Results

  • 62 tests added
  • All tests passing

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

This PR adds unit test coverage (via Vitest) for the tools/releaser utility modules that support the release pipeline (version handling, git tagging/changelog, GitHub releases/assets, plugin discovery, and ArtifactHub metadata updates), addressing #798.

Changes:

  • Adds new Vitest configuration for the tools/releaser package (including coverage settings).
  • Introduces new unit tests for releaser utility modules: artifacthub, git, github, plugin, and version.

Reviewed changes

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

Show a summary per file
File Description
tools/releaser/vitest.config.ts Adds Vitest + coverage configuration for releaser utility tests.
tools/releaser/src/utils/version.test.ts Adds tests for version sanitization/validation helpers.
tools/releaser/src/utils/plugin.test.ts Adds tests for plugin path discovery, plugin listing, metadata extraction, and tarball selection.
tools/releaser/src/utils/github.test.ts Adds tests for GitHub release creation, lookup, asset upload, and publish behavior.
tools/releaser/src/utils/git.test.ts Adds tests for git helper functions (repo root, tags, status, changelog, etc.).
tools/releaser/src/utils/artifacthub.test.ts Adds tests for ArtifactHub config/template read/update helpers.

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

Comment thread tools/releaser/vitest.config.ts
Comment thread tools/releaser/vitest.config.ts
@skools-here skools-here requested a review from Copilot June 12, 2026 17:42

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/vitest.config.ts
Comment thread tools/releaser/src/utils/version.test.ts Outdated
Comment thread tools/releaser/src/utils/plugin.test.ts Outdated
Comment thread tools/releaser/src/utils/github.test.ts
Comment thread tools/releaser/tsconfig.json Outdated
@skools-here skools-here requested a review from Copilot June 12, 2026 18:11

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/src/utils/version.test.ts Outdated
Comment thread tools/releaser/src/utils/plugin.test.ts Outdated
Comment thread tools/releaser/src/utils/git.test.ts Outdated
@skools-here skools-here requested a review from Copilot June 12, 2026 18:29
@skools-here skools-here force-pushed the releaser-utils-vitest-coverage branch from 8d65215 to 72f4cbf Compare June 12, 2026 18:30

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/src/utils/plugin.test.ts Outdated
Comment thread tools/releaser/src/utils/github.test.ts Outdated
Comment thread tools/releaser/src/utils/artifacthub.test.ts Outdated
Comment thread tools/releaser/src/utils/artifacthub.test.ts Outdated
@skools-here skools-here force-pushed the releaser-utils-vitest-coverage branch from 8e2d6a8 to 850c896 Compare June 12, 2026 18:36
@skools-here skools-here requested a review from Copilot June 12, 2026 18:36

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/src/utils/git.test.ts Outdated
Comment thread tools/releaser/src/utils/git.test.ts Outdated
Comment thread tools/releaser/src/utils/github.test.ts Outdated
Comment thread tools/releaser/src/utils/github.test.ts
Comment thread tools/releaser/src/utils/version.test.ts Outdated
@skools-here skools-here force-pushed the releaser-utils-vitest-coverage branch from ea54389 to 2693121 Compare June 12, 2026 18:52
@skools-here skools-here requested a review from Copilot June 12, 2026 18:53

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/src/utils/version.test.ts Outdated
Comment thread tools/releaser/src/utils/version.test.ts
Comment thread tools/releaser/src/utils/version.test.ts
Comment thread tools/releaser/src/utils/github.test.ts Outdated
Comment thread tools/releaser/src/utils/github.test.ts
Comment thread tools/releaser/src/utils/github.test.ts Outdated
Comment thread tools/releaser/src/utils/github.test.ts Outdated
@skools-here skools-here force-pushed the releaser-utils-vitest-coverage branch from 84f5b1f to 7f0a3b9 Compare June 12, 2026 19:03
@skools-here skools-here requested a review from Copilot June 12, 2026 19:04

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/src/utils/version.test.ts
Comment thread tools/releaser/src/utils/plugin.test.ts
Comment thread tools/releaser/src/utils/github.test.ts
Comment thread tools/releaser/src/utils/git.test.ts
Comment thread tools/releaser/src/utils/artifacthub.test.ts
Comment thread tools/releaser/vitest.config.ts
Comment thread tools/releaser/tsconfig.json Outdated
@skools-here skools-here requested a review from Copilot June 12, 2026 19:30

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/src/utils/git.test.ts Outdated
Comment thread tools/releaser/src/utils/artifacthub.test.ts Outdated
Comment thread tools/releaser/src/utils/artifacthub.test.ts Outdated
@skools-here skools-here force-pushed the releaser-utils-vitest-coverage branch from 8c253c7 to 409c528 Compare June 12, 2026 19:41
@skools-here skools-here requested a review from Copilot June 12, 2026 19:41

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/src/utils/plugin.test.ts Outdated
Comment thread tools/releaser/src/utils/version.test.ts
Comment thread tools/releaser/vitest.config.ts
@skools-here skools-here force-pushed the releaser-utils-vitest-coverage branch from c651d15 to c7dcbc7 Compare June 12, 2026 19:55
@skools-here skools-here requested a review from Copilot June 12, 2026 19:56

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/vitest.config.ts
Comment thread tools/releaser/src/utils/version.test.ts
Comment thread tools/releaser/src/utils/plugin.test.ts
@skools-here

Copy link
Copy Markdown
Author

Hi! @illume I've fixed the Copilot review comments . Could you please take another look when you have a chance?

Thanks!

@skools-here skools-here force-pushed the releaser-utils-vitest-coverage branch from 8171ea6 to 69e57c3 Compare June 27, 2026 14:52

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/package.json

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/src/utils/git.test.ts
Comment thread tools/releaser/src/utils/git.test.ts
Comment thread tools/releaser/src/utils/github.test.ts

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

Comment thread tools/releaser/vitest.config.ts
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>
Signed-off-by: skools-here <sajalkulshreshtha9@gmail.com>

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

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

Files not reviewed (1)
  • tools/releaser/package-lock.json: Generated file

@skools-here

Copy link
Copy Markdown
Author

ptal @illume

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.

Add Vitest coverage for tools/releaser utility functions

3 participants