Skip to content

fix: export SourceKind from pkg/provider - #1064

Open
devsy-app[bot] wants to merge 2 commits into
mainfrom
fix/codefactor/export-source-kind
Open

fix: export SourceKind from pkg/provider#1064
devsy-app[bot] wants to merge 2 commits into
mainfrom
fix/codefactor/export-source-kind

Conversation

@devsy-app

@devsy-app devsy-app Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codefactor fix: exported func returns unexported type

  • Issue Key: 6a77b13d5b1ec0b4ee20c45e (Maintainability, Minor)
  • File:line: pkg/provider/versions.go:30
  • Codefactor message: Exported function ClassifyVersionSource returns unexported type sourceKind, making the return value unusable by external callers of the public API.

Change

Export the sourceKind type and its constants so ClassifyVersionSource's public signature is usable by external callers:

  • sourceKindSourceKind
  • sourceUnknownSourceUnknown
  • sourceGitHubSourceGitHub
  • sourceManifestURLSourceManifestURL
  • sourceLocalSourceLocal

The internal call site in ListVersionsForSource and the table-driven test in versions_test.go were updated to the exported names. No behavior change.

Verification

  • task cli:format — clean
  • task cli:lint:ci — 0 issues
  • task cli:testpkg/provider passes. (Pre-existing known failure pkg/git TestRepoClone* fails on origin/main already; this change does not touch pkg/git.)

This PR was created by an AI agent as part of an automated daily Codefactor issue fix job.

ClassifyVersionSource is an exported function but returned the unexported sourceKind type (and its unexported constants), flagged by Codefactor (Maintainability: exported func returning unexported type). Export the type and constants as SourceKind/SourceUnknown/SourceGitHub/SourceManifestURL/SourceLocal so the API is usable by external callers. No behavior change; tests updated to the exported names.
@netlify

netlify Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 9893c8c
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a829f050bd5ba00082fcc58

@devsy-app devsy-app Bot added the codefactor label Aug 15, 2026
@netlify

netlify Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 9893c8c
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a829f0532725200083a0a02

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@skevetter
skevetter marked this pull request as ready for review August 17, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant