Skip to content

Add release asset filtering options - #197

Open
JohnBreault wants to merge 5 commits into
mainfrom
feature/release-asset-filtering
Open

JohnBreault wants to merge 5 commits into
mainfrom
feature/release-asset-filtering

Conversation

@JohnBreault

Copy link
Copy Markdown
Contributor

Summary

  • add platform include/exclude filters and CodeQL bundle archive format selection to pull and sync
  • prune filtered assets from reused caches while retaining metadata and update-job proxies
  • validate sync destination arguments before downloading and document the new options

Testing

  • go test ./...
  • go build ./...
  • go mod tidy (no changes)

Allow pull and sync commands to select release assets by platform and CodeQL bundle archive format, while pruning filtered assets from reused caches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1b06e255-2872-4101-af13-c3ba6f382849
Copilot AI balanced review requested due to automatic review settings October 8, 2026 01:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Required platforms can silently lack bundles, and malformed destination URLs can pass validation.

2 open findings
What changed in this PR

Adds configurable release asset filtering for pull/sync operations, cache pruning, and earlier destination validation.

Changes:

  • Adds platform and bundle-format filters.
  • Prunes excluded cached assets while preserving metadata.
  • Validates destination arguments before syncing.
File Description
README.md Documents filtering options and behavior.
internal/​push/​push.go Adds destination validation.
internal/​push/​push_test.go Tests destination validation.
internal/​pull/​release_asset_filter.go Implements asset classification and filtering.
internal/​pull/​release_asset_filter_test.go Tests filter behavior.
internal/​pull/​pull.go Applies filters and prunes caches.
internal/​pull/​pull_test.go Tests filtered downloads and pruning.
cmd/​sync.go Wires validation and filters into sync.
cmd/​pull.go Defines and wires filtering flags.
.gitignore Ignores release output.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread internal/pull/release_asset_filter.go
Comment thread internal/push/push.go Outdated
lindluni and others added 3 commits October 7, 2026 21:53
Filter historical cached releases while preserving metadata and retained assets. Warn about archive-format compatibility and document explicit CodeQL tools URLs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 08d6e96b-f498-4efa-bae5-9c6012fafe3c
Validate every explicitly included platform when an archive format is requested, including absent platforms and checksum-only or language-only assets. Preserve format-unrestricted behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 08d6e96b-f498-4efa-bae5-9c6012fafe3c
Fail preflight validation for surrounding whitespace and non-root paths, including escaped paths. Preserve root URLs with trailing slashes and existing query/fragment handling. Add regression tests and document the root URL requirement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 08d6e96b-f498-4efa-bae5-9c6012fafe3c
Copilot AI balanced review requested due to automatic review settings October 8, 2026 02:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Destination URLs containing queries or fragments pass validation but produce malformed GitHub Enterprise API URLs.

1 open finding
2 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread internal/push/push.go Outdated
Enforce the destination as a strict GitHub Enterprise root URL by rejecting query strings and fragments before cache creation or network access. Add regression coverage and update the usage documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 08d6e96b-f498-4efa-bae5-9c6012fafe3c
Copilot AI balanced review requested due to automatic review settings October 8, 2026 02:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The filtering, cache-pruning, validation, documentation, and test coverage are consistent and complete.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

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.

3 participants