Skip to content

feat: add bucket management actions#152

Draft
goanpeca wants to merge 1 commit into
mainfrom
feat/issue-100-bucket-admin
Draft

feat: add bucket management actions#152
goanpeca wants to merge 1 commit into
mainfrom
feat/issue-100-bucket-admin

Conversation

@goanpeca

Copy link
Copy Markdown
Contributor

Summary

  • add create-bucket, delete-bucket, and list-buckets actions backed by the B2 SDK bucket APIs
  • add bucket-type and bucket-info parsing for bucket creation plus bucket-specific outputs
  • update action metadata, README docs, dispatcher/output contract tests, and the bundled dist/ entrypoint

Linked issue

Closes #100

Tests run

  • pnpm typecheck
  • pnpm exec vitest run __tests__/inputs.test.ts __tests__/commands/buckets.test.ts __tests__/main.test.ts __tests__/main-output-contract.test.ts
  • pnpm docs:check-action-yml
  • pnpm lint
  • pnpm spellcheck
  • pnpm test
  • pnpm build

Follow-up notes

Advanced bucket settings such as CORS, lifecycle, default encryption, retention, and replication remain out of scope for this issue.

Copilot AI review requested due to automatic review settings July 20, 2026 19:55
@goanpeca goanpeca added this to the v1.2.0 milestone Jul 20, 2026
@goanpeca goanpeca added enhancement New feature or request sdk-parity SDK capability not yet exposed by the action control-plane Bucket administration / provisioning (scope decision) labels Jul 20, 2026
@goanpeca goanpeca self-assigned this Jul 20, 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

This PR expands the action’s command surface to include control-plane bucket administration, aligning the action with the B2 SDK’s bucket APIs and closing the linked issue’s acceptance criteria (create, list, delete empty buckets).

Changes:

  • Adds create-bucket, delete-bucket, and list-buckets command implementations and dispatch paths, including bucket-specific outputs and step summaries.
  • Introduces bucket-type and bucket-info inputs (with validation/parsing) to support bucket creation metadata.
  • Updates action metadata, README documentation, tests (dispatcher + output contract + command tests), and regenerates dist/index.js.

Reviewed changes

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

Show a summary per file
File Description
src/main.ts Dispatches new bucket verbs, emits bucket outputs (bucket-*, bucket-count, buckets-listed) and summary-json for bucket results.
src/inputs.ts Extends action enum, makes bucket optional only for list-buckets, adds bucket-type and bucket-info parsing/validation.
src/commands/buckets.ts Implements SDK-backed create/delete/list bucket commands with grouped logging and structured results.
README.md Documents the three new verbs, their inputs, and the new bucket-related outputs.
dist/index.js Updates the bundled action entrypoint to include the new commands and input parsing changes.
action.yml Exposes new verbs and inputs, adjusts bucket required-ness, and documents new outputs.
tests/main.test.ts Extends dispatcher tests to cover the three new actions and their output expectations.
tests/main-output-contract.test.ts Adds golden output-key sets for bucket actions and mocks the new command module.
tests/inputs.test.ts Adds coverage for list-buckets bucket optionality, create-bucket parsing, and bucket-info validation.
tests/commands/buckets.test.ts Adds simulator-backed integration tests for bucket create/list/delete behaviors.
tests/_parsed-inputs.ts Extends parsed-input test helper defaults with bucketType and bucketInfo.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

control-plane Bucket administration / provisioning (scope decision) 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.

buckets: create, delete, and list buckets

2 participants