Skip to content

feat: add archived repository filtering - #67

Merged
gubraun merged 2 commits into
mainfrom
feat-exclude-archived
Nov 6, 2026
Merged

gubraun merged 2 commits into
mainfrom
feat-exclude-archived

Conversation

@gubraun

@gubraun gubraun commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add the existing-compatible --exclude-archived CLI option, defaulting to false so current behavior is unchanged.
  • Filter archived repositories from organization listings before SBOM collection when enabled.
  • Add a node:test integration test using a local mock GitHub API, and update the testing guide, README, and changelog.

This PR supersedes #42, which introduced the same feature. Thanks to @densfox for the original implementation and for bringing the archived-repository filtering use case forward.

Validation

  • npm run build
  • npm test (18 tests passed, including both archived-filtering cases)
  • npm run lint

The local API test covers the collector flow without credentials. The documented end-to-end check against a real test organization and Enterprise was not run.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@gubraun
gubraun requested a review from a team as a code owner November 6, 2026 17:52
@gubraun
gubraun requested review from adrienpessu and felickz and a balanced review from Copilot November 6, 2026 17: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.

🟡 Changes recommended

With a populated SBOM cache, organization sync using --exclude-archived still exposes cached archived SBOMs to searches and malware matching because excluded entries remain in the returned collection.

1 open issue
What changed in this PR

Adds opt-in archived-repository filtering to the SBOM collector, preserving the existing default of including archived repositories.

Changes:

  • Wires --exclude-archived through the CLI to organization repository listings.
  • Adds local mock API tests for including and excluding archived repositories.
  • Updates the test command and user documentation.
File Description
TESTING.md Documents the archived-filtering integration tests.
src/​sbomCollector.ts Adds the option and filters archived repositories during listing.
src/​exclude-archived.test.ts Tests collection with filtering enabled and disabled.
src/​cli.ts Defines and forwards --exclude-archived.
README.md Documents the new CLI flag.
package.json Includes the new integration tests in npm test.
CHANGELOG.md Records optional archived-repository filtering.

Review effort: Balanced

Comment thread src/sbomCollector.ts Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 17:59

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.

🟢 Approval recommended

No active review issues are recorded for the optional archived-repository filtering change.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@gubraun
gubraun merged commit cce8967 into main Nov 6, 2026
7 checks passed
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.

2 participants