Skip to content

Add --dry-run flag to share-link revoke - #346

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
feature/share-link-revoke-dry-run
Jul 9, 2026
Merged

AndreyVMarkelov merged 1 commit into
masterfrom
feature/share-link-revoke-dry-run

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a --dry-run flag to dbxcli share-link revoke, matching the convention used by mkdir, rm, restore, mv, cp, and put. Covers both invocation modes:

  • By URL: prints Would revoke shared link <url> without calling the Dropbox API.
  • By --path: still lists the direct shared links (so the preview reflects exactly which links would be revoked) but skips the RevokeSharedLink calls and the verbose "Revoked N links" status.

JSON output reports status planned with dry_run=true in the input. Introduces shareLinkRevokeResultInput to carry dry_run in the per-result input, which was previously empty for this command. Manifest, JSON contract test, and golden schema updated in lockstep; regenerated docs/schemas show no drift.

Testing

  • go build ./..., go vet ./cmd/, gofmt clean
  • go test ./... passes
  • New tests cover URL dry-run (text + JSON) and --path dry-run, all asserting RevokeSharedLink is never called and that --path mode still lists links.

Preview shared-link revocations without calling the Dropbox API for both
invocation modes: revoke by URL and revoke-all for a Dropbox path via
--path. Text output prints "Would revoke shared link <url>"; JSON reports
status "planned" with dry_run=true in the input.

In --path mode, dry-run still lists the direct shared links (so the
preview reflects exactly which links would be revoked) but skips the
RevokeSharedLink calls and the verbose "Revoked N links" status.

Introduces shareLinkRevokeResultInput to carry dry_run in the per-result
input, which was previously empty for this command.
@AndreyVMarkelov
AndreyVMarkelov merged commit a0b17cd into master Jul 9, 2026
13 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.

1 participant