Skip to content

Reduce pkg/cli package manifest largefunc backlog - #52218

Draft
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/lint-monster-reduce-function-length
Draft

Reduce pkg/cli package manifest largefunc backlog#52218
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/lint-monster-reduce-function-length

Conversation

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Daily custom lint flagged oversized pkg/cli helpers. This PR takes a focused first slice by reducing the add_package_manifest.go function-length findings without broad rewrites.

  • Repository package resolution

    • Extracts repo slug parsing, ref resolution, extension-file resolution, and result construction from resolveRepositoryPackage.
  • Manifest parsing

    • Splits YAML/root validation, version checks, and metadata population out of parseRepositoryPackageManifest.
  • Skill file resolution

    • Separates skill directory normalization, manifest/auto-scan merging, marker validation, and recursive file listing.
manifest, warnings, err := parseRepositoryPackageManifest(manifestPath, manifestContent)
installationSources, includeSkillDirs, includeAgentFiles, err :=
	resolveRepositoryPackageInstallablePaths(ctx, owner, repo, packagePath, ref, host, manifest, manifestPath)
extensionFiles, err := resolveRepositoryPackageExtensionFiles(ctx, repositoryPackageExtensionFilesRequest{...})

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Triage: pr-type:refactor · pr-risk:low · Score 35/100 (impact 10, urgency 10, quality 15)

Recommended action: batch_review (batch: lintmonster-refactor)

Function-length reduction in add_package_manifest.go (1 file, +217/-108). Single-file, mechanical extraction. Draft, CI not yet run. Grouped with #52220, #52219, #52212.

Generated by 🔧 PR Triage Agent · auto · 44.6 AIC · ⌖ 2.44 AIC · ⊞ 7.8K ·

@github-actions

Copy link
Copy Markdown
Contributor

Triage

Largest diff in the batch (217 additions) targeting add_package_manifest.go largefunc backlog. CI unstable — recheck before merge.

Generated by 🔧 PR Triage Agent · auto · 41.1 AIC · ⌖ 2.53 AIC · ⊞ 7.8K ·

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.

[lint-monster] reduce pkg/cli function-length backlog (first slice)

2 participants