Skip to content

feat: expose 'resolve' / 'reopen' action on drive comments reply #623

@sebsnyk

Description

@sebsnyk

Summary

The Drive REST API supports resolving (and reopening) comments by creating a reply with an action field. gog drive comments reply currently accepts only the content arg — no way to also resolve in the same call.

Today the workaround for resolving a comment programmatically is to gog drive comments delete it, which destroys the thread (acceptable for self-comments but wrong for review-threads from external contributors).

What the API supports

Per Drive API v3 — Reply resource:

action (string): The action the reply performed to the parent comment. The supported values are: resolve and reopen

The pattern is:

```
POST /drive/v3/files/{fileId}/comments/{commentId}/replies
{
"content": "...optional message...",
"action": "resolve"
}
```

This posts the reply AND flips the parent comment's resolved state, atomically.

Proposed addition

```
gog drive comments reply --action=resolve
gog drive comments reply --action=reopen
```

Or as a sibling subcommand if a separate verb reads cleaner:

```
gog drive comments resolve []
gog drive comments reopen []
```

Either works. The --action flag on reply is closer to the underlying API shape, but a verb subcommand may be more discoverable.

Use case

Batch-processing inline review feedback on Google Docs from a PM workflow — reply with the substantive resolution AND mark the thread resolved in a single command. Without this, the only options are:

  1. Delete the comment (current workaround; destroys thread context — only acceptable for self-comments)
  2. Manually click "Resolve" in the Docs UI per thread (doesn't scale past ~10 comments)
  3. Mint an access token via gog's stored OAuth client + call the Drive REST API directly with curl (works but requires per-script plumbing)

Adjacent

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions