Repository navigation
Add --dry-run flag to share-link revoke - #346
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--dry-runflag todbxcli share-link revoke, matching the convention used bymkdir,rm,restore,mv,cp, andput. Covers both invocation modes:Would revoke shared link <url>without calling the Dropbox API.--path: still lists the direct shared links (so the preview reflects exactly which links would be revoked) but skips theRevokeSharedLinkcalls and the verbose "Revoked N links" status.JSON output reports status
plannedwithdry_run=truein the input. IntroducesshareLinkRevokeResultInputto carrydry_runin 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/,gofmtcleango test ./...passes--pathdry-run, all assertingRevokeSharedLinkis never called and that--pathmode still lists links.