Skip to content

feat: add list-versions action#133

Closed
goanpeca wants to merge 3 commits into
mainfrom
feat/issue-93-list-versions
Closed

feat: add list-versions action#133
goanpeca wants to merge 3 commits into
mainfrom
feat/issue-93-list-versions

Conversation

@goanpeca

@goanpeca goanpeca commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds action: list-versions to enumerate every B2 file version under the source prefix, including hide markers and historical uploads.
  • Emits per-version fileId, action, uploadTimestamp, contentLength, and related metadata in summary-json.
  • Honors max-results truncation, rejects list-versions requests above 10000 before pagination, forwards cancellation signals, and requests one extra page item when possible to detect truncation efficiently.
  • Updates docs, source input contracts, tests, and the bundled dist output.

Linked issue

Closes #93

Tests run

  • pnpm lint
  • pnpm typecheck
  • pnpm docs:check-action-yml
  • pnpm exec vitest run __tests__/commands/list-hide-verify.test.ts __tests__/main.test.ts __tests__/main-output-contract.test.ts
  • pnpm exec vitest run __tests__/commands/list-hide-verify.test.ts
  • pnpm test
  • pnpm build
  • pnpm verify-dist
  • pnpm spellcheck
  • pre-commit hook: lint, release provenance, typecheck, vitest, ncc build, cspell
  • pre-push hook: vitest --coverage

Follow-up notes

  • None.

Copilot AI review requested due to automatic review settings June 27, 2026 16:13
@goanpeca goanpeca added this to the v1.2.0 milestone Jun 27, 2026
@goanpeca goanpeca added enhancement New feature or request sdk-parity SDK capability not yet exposed by the action labels Jun 27, 2026
@goanpeca goanpeca self-assigned this Jun 27, 2026
@github-actions

Copy link
Copy Markdown

Build artifact for this PR: build.tar.gz (valid 1 hour)

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.

Pull request overview

Adds a new list-versions action to enumerate all Backblaze B2 file versions under a prefix (including historical uploads and hide markers) and to emit per-version metadata via summary-json, with dispatcher wiring, docs, tests, and bundled dist updates.

Changes:

  • Introduces listVersionsCommand powered by Bucket.paginateFileVersions() and wires it into the main dispatcher.
  • Extends inputs/outputs/docs to include action: list-versions and clarifies max-results / truncation behavior.
  • Adds unit/integration coverage and updates dist/index.js to match src.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main.ts Dispatches action: list-versions, emits outputs, warnings, and step summary rows.
src/inputs.ts Registers list-versions as a valid action and defines its effect as read-only.
src/commands/list.ts Adds ListedFileVersion / ListVersionsResult and implements listVersionsCommand.
README.md Documents the new verb, example usage, and summary-json shape for list-versions.
action.yml Updates action input/output descriptions to include list-versions.
tests/main.test.ts Adds dispatcher test coverage for list-versions summaries/outputs.
tests/main-output-contract.test.ts Extends output-key contract to include list-versions.
tests/commands/list-hide-verify.test.ts Adds integration tests for version enumeration and truncation behavior.
dist/index.js Updates bundled output to include the new action and command logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/commands/list.ts Outdated
@github-actions

Copy link
Copy Markdown

Build artifact for this PR: build.tar.gz (valid 1 hour)

Copilot AI review requested due to automatic review settings June 27, 2026 16:28
@github-actions

Copy link
Copy Markdown

Build artifact for this PR: build.tar.gz (valid 1 hour)

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.

Pull request overview

Copilot reviewed 8 out of 10 changed files in this pull request and generated no new comments.

@goanpeca goanpeca closed this Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request sdk-parity SDK capability not yet exposed by the action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

list: enumerate all file versions, not just current uploads

2 participants