Repository navigation
Add release asset filtering options - #197
JohnBreault wants to merge 5 commits into
Conversation
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
There was a problem hiding this comment.
🟡 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.
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
There was a problem hiding this comment.
🟡 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.
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
There was a problem hiding this comment.
🟢 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.


Summary
pullandsyncTesting
go test ./...go build ./...go mod tidy(no changes)