Skip to content

feat: drive identity by name (RFC 0008)#84

Merged
rmanibus merged 1 commit into
mainfrom
feat/drive-identity-by-name
Mar 14, 2026
Merged

feat: drive identity by name (RFC 0008)#84
rmanibus merged 1 commit into
mainfrom
feat/drive-identity-by-name

Conversation

@rmanibus
Copy link
Copy Markdown
Contributor

@rmanibus rmanibus commented Mar 14, 2026

Summary

Implement RFC 0008 by enabling drive selection and identity resolution by name for cloud sources.

What Changes

  • Update backup/source parsing and source initialization paths for drive-name-based selection.
  • Improve Google Drive and OneDrive drive resolution behavior.
  • Update CLI/help/completion and docs for the new drive identity behavior.
  • Add RFC and related docs updates:
    • rfcs/0008-drive-identity-by-name.md
    • docs/user-guide.md
    • docs/sources.md

Behavior Notes

  • Users can target drives by human-readable name where supported.
  • Resolution errors are clearer for missing/ambiguous names.

Testing

  • Includes source and CLI test updates covering drive-name handling paths.

Tracking

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 14, 2026

@rmanibus rmanibus force-pushed the feat/drive-identity-by-name branch 2 times, most recently from 7ea7ee2 to a0a0852 Compare March 14, 2026 13:12
@rmanibus rmanibus force-pushed the feat/drive-identity-by-name branch from a0a0852 to 60e9da8 Compare March 14, 2026 13:16
@rmanibus rmanibus merged commit 4d8880c into main Mar 14, 2026
5 checks passed
@rmanibus rmanibus deleted the feat/drive-identity-by-name branch March 14, 2026 13:20
@rmanibus rmanibus added the enhancement New feature or request label Mar 15, 2026
@rmanibus rmanibus changed the title feat: drive-identity-by-name feat: drive identity by name (RFC 0008) Mar 15, 2026
@rmanibus rmanibus linked an issue Mar 15, 2026 that may be closed by this pull request
@rmanibus rmanibus requested a review from Copilot March 16, 2026 08:47
Copy link
Copy Markdown

Copilot AI left a comment

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 implements RFC 0008, enabling cloud drive selection by human-readable name instead of opaque IDs. The -drive-id CLI flag is removed in favor of encoding the drive name in the source URI's host component (e.g., gdrive://Company Data/path). Both Google Drive and OneDrive sources gain drive-name resolution logic that first tries a direct ID lookup, then falls back to a name-based search with ambiguity detection.

Changes:

  • Add drive-name-based URI parsing (scheme://Drive Name/path) and wire it through the CLI, removing the -drive-id flag from backup args, completions, and help text.
  • Implement resolveDriveName for both Google Drive and OneDrive sources, with fallback from ID lookup to name search and ambiguity/not-found error handling.
  • Update documentation (user guide, sources, RFC) and add the new RFC 0008 document.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
rfcs/0008-drive-identity-by-name.md New RFC describing the drive-by-name feature
rfcs/0007-cloud-subdirectory-backup.md Status update from "Adopted" to "Implemented"
pkg/source/onedrive.go Add driveName/driveID fields, resolveDriveName, getRootURL, and updated Info()
pkg/source/onedrive_changes.go Use getRootURL() for delta token URL construction
pkg/source/gdrive.go Add WithDriveName option and drive-name resolution logic
cmd/cloudstic/cmd_backup.go Remove -drive-id flag, pass uri.host as drive name to source constructors
cmd/cloudstic/store.go Parse :// URI format to extract drive name as host component
cmd/cloudstic/store_test.go Add test cases for drive-name URI parsing
cmd/cloudstic/usage.go Update help text to reflect new URI format
cmd/cloudstic/completion.go Remove -drive-id from bash/zsh/fish completions
docs/user-guide.md Update examples, flag tables, and section headings
docs/sources.md Update source documentation for new URI convention
scripts/check.sh Add markdownlint step to check script

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

Comment thread scripts/check.sh
Comment thread pkg/source/onedrive.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC 0008: Epic / Tracking issue for drive identity by name

2 participants