Skip to content

Commit e2157c2

Browse files
authored
Merge 89827b1 into 32ad20a
2 parents 32ad20a + 89827b1 commit e2157c2

6 files changed

Lines changed: 10 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Fixed
66

77
- Gmail: keep label IDs case-sensitive during label resolution and duplicate-name checks while still matching label names case-insensitively.
8+
- Gmail: clarify that `gmail drafts delete` permanently deletes drafts and cannot be recovered. (#656, #659) — thanks @chrischall.
89
- Docs: update the bundled `gog` agent skill to preserve broad user OAuth scopes during reauth and rely on command guards for scoped execution.
910

1011
## 0.19.0 - 2026-05-22

docs/commands.generated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ Generated from `gog schema --json`.
335335
- [`gog gmail (mail,email) batch modify (update,edit,set) <messageId> ... [flags]`](commands/gog-gmail-batch-modify.md) - Modify labels on multiple messages
336336
- [`gog gmail (mail,email) drafts (draft) <command>`](commands/gog-gmail-drafts.md) - Draft operations
337337
- [`gog gmail (mail,email) drafts (draft) create (add,new) [flags]`](commands/gog-gmail-drafts-create.md) - Create a draft
338-
- [`gog gmail (mail,email) drafts (draft) delete (rm,del,remove) <draftId>`](commands/gog-gmail-drafts-delete.md) - Delete a draft
338+
- [`gog gmail (mail,email) drafts (draft) delete (rm,del,remove) <draftId>`](commands/gog-gmail-drafts-delete.md) - Permanently delete a draft (not recoverable; drafts are not moved to Trash)
339339
- [`gog gmail (mail,email) drafts (draft) get (info,show) <draftId> [flags]`](commands/gog-gmail-drafts-get.md) - Get draft details
340340
- [`gog gmail (mail,email) drafts (draft) list (ls) [flags]`](commands/gog-gmail-drafts-list.md) - List drafts
341341
- [`gog gmail (mail,email) drafts (draft) send (post) <draftId>`](commands/gog-gmail-drafts-send.md) - Send a draft

docs/commands/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ Generated pages: 572.
386386
- [gog gmail batch modify](gog-gmail-batch-modify.md) - Modify labels on multiple messages
387387
- [gog gmail drafts](gog-gmail-drafts.md) - Draft operations
388388
- [gog gmail drafts create](gog-gmail-drafts-create.md) - Create a draft
389-
- [gog gmail drafts delete](gog-gmail-drafts-delete.md) - Delete a draft
389+
- [gog gmail drafts delete](gog-gmail-drafts-delete.md) - Permanently delete a draft (not recoverable; drafts are not moved to Trash)
390390
- [gog gmail drafts get](gog-gmail-drafts-get.md) - Get draft details
391391
- [gog gmail drafts list](gog-gmail-drafts-list.md) - List drafts
392392
- [gog gmail drafts send](gog-gmail-drafts-send.md) - Send a draft

docs/commands/gog-gmail-drafts-delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> Generated from `gog schema --json`. Do not edit this page by hand; run `make docs-commands`.
44
5-
Delete a draft
5+
Permanently delete a draft (not recoverable; drafts are not moved to Trash)
66

77
## Usage
88

docs/commands/gog-gmail-drafts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ gog gmail (mail,email) drafts (draft) <command>
1717
## Subcommands
1818

1919
- [gog gmail drafts create](gog-gmail-drafts-create.md) - Create a draft
20-
- [gog gmail drafts delete](gog-gmail-drafts-delete.md) - Delete a draft
20+
- [gog gmail drafts delete](gog-gmail-drafts-delete.md) - Permanently delete a draft (not recoverable; drafts are not moved to Trash)
2121
- [gog gmail drafts get](gog-gmail-drafts-get.md) - Get draft details
2222
- [gog gmail drafts list](gog-gmail-drafts-list.md) - List drafts
2323
- [gog gmail drafts send](gog-gmail-drafts-send.md) - Send a draft

internal/cmd/gmail_drafts.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
type GmailDraftsCmd struct {
1717
List GmailDraftsListCmd `cmd:"" name:"list" aliases:"ls" help:"List drafts"`
1818
Get GmailDraftsGetCmd `cmd:"" name:"get" aliases:"info,show" help:"Get draft details"`
19-
Delete GmailDraftsDeleteCmd `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Delete a draft"`
19+
Delete GmailDraftsDeleteCmd `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Permanently delete a draft (not recoverable; drafts are not moved to Trash)"`
2020
Send GmailDraftsSendCmd `cmd:"" name:"send" aliases:"post" help:"Send a draft"`
2121
Create GmailDraftsCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a draft"`
2222
Update GmailDraftsUpdateCmd `cmd:"" name:"update" aliases:"edit,set" help:"Update a draft"`
@@ -178,6 +178,9 @@ func (c *GmailDraftsGetCmd) Run(ctx context.Context, flags *RootFlags) error {
178178
return nil
179179
}
180180

181+
// GmailDraftsDeleteCmd permanently deletes a draft. The Gmail API's
182+
// users.drafts.delete is irreversible — drafts are not moved to Trash and have
183+
// no untrash path — so this cannot be undone.
181184
type GmailDraftsDeleteCmd struct {
182185
DraftID string `arg:"" name:"draftId" help:"Draft ID"`
183186
}
@@ -191,7 +194,7 @@ func (c *GmailDraftsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error
191194

192195
if confirmErr := dryRunAndConfirmDestructive(ctx, flags, "gmail.drafts.delete", map[string]any{
193196
"draft_id": draftID,
194-
}, fmt.Sprintf("delete gmail draft %s", draftID)); confirmErr != nil {
197+
}, fmt.Sprintf("permanently delete gmail draft %s (not recoverable; drafts are not moved to Trash)", draftID)); confirmErr != nil {
195198
return confirmErr
196199
}
197200

0 commit comments

Comments
 (0)