Skip to content

feat(page): make 'archive' canonical, keep 'delete'/'trash' as aliases#43

Merged
4ier merged 1 commit into
mainfrom
feat/page-archive-alias
Apr 30, 2026
Merged

feat(page): make 'archive' canonical, keep 'delete'/'trash' as aliases#43
4ier merged 1 commit into
mainfrom
feat/page-archive-alias

Conversation

@4ier
Copy link
Copy Markdown
Owner

@4ier 4ier commented Apr 30, 2026

Closes #35. Non-breaking naming refactor.

  • page archive is now the canonical command; delete and trash are aliases.
  • Success message explains soft-delete + how to undo.
  • page restore Long updated for symmetry.

Smoke-tested: archive → restore → trash → restore → delete → in_trash=true all works.

Three changes to de-scare the soft-delete command:

- 'page archive <id>' is the canonical form. This is the term used in
  Notion's UI and in the 2025 API (where the field is renamed in_trash,
  kept backwards-compatible with 'archived').
- 'page delete' and 'page trash' are now cobra aliases that resolve to
  the same RunE. Existing scripts pinned on 'page delete' keep working
  unchanged; the legacy variable pageDeleteCmd also still exists as an
  assignment to pageArchiveCmd for any external code path.
- Help text now makes the soft-delete nature explicit and the success
  line tells the user how to undo ('run notion page restore').

The page restore Long was updated to say 'reverse of archive / delete /
trash' for symmetry.

Aliases are hidden from 'notion page --help' by cobra, so new users see
one canonical command; they surface on 'notion page <alias> --help'.

Closes #35
@4ier 4ier merged commit ac8850f into main Apr 30, 2026
3 of 4 checks passed
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.

page archive / page trash: clearer aliases for the soft-delete command

1 participant