Skip to content

feat(drive): add OWNER column to ls/search output#458

Open
laihenyi wants to merge 5 commits intosteipete:mainfrom
laihenyi:feat/drive-owner-column
Open

feat(drive): add OWNER column to ls/search output#458
laihenyi wants to merge 5 commits intosteipete:mainfrom
laihenyi:feat/drive-owner-column

Conversation

@laihenyi
Copy link
Contributor

Summary

  • Request the owners field from the Drive API in drive ls and drive search list calls
  • Display the primary owner's email address in a new OWNER column in plain/table output
  • JSON output already included owners via the driveGet path; this brings parity to listing commands

This is useful for identifying file ownership at a glance, especially in shared drives where files may belong to different users.

Changes

  • internal/cmd/drive_listing.go: Added owners to driveFileListFields, added OWNER column to table output, added driveOwnerEmail() helper

Test plan

  • make builds successfully
  • go test ./internal/cmd/ -run TestDrive — 72 tests pass
  • Manual: gog drive ls --parent <folder> shows OWNER column
  • Manual: gog drive search <query> shows OWNER column
  • Manual: gog drive ls --json includes owners in output

🤖 Generated with Claude Code

laihenyi and others added 5 commits February 23, 2026 12:39
Add shortcutDetails to the Drive Get API fields to enable resolving
shortcut target file IDs and MIME types.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Request the `owners` field from the Drive API in list/search calls
and display the primary owner's email in a new OWNER column in the
plain/table output. JSON output already included the full owners
array via the driveGet path; this change brings parity to the
listing commands so users can identify file ownership at a glance,
which is especially useful in shared drives.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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