Rename subject variable to title in message shortcut#246
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aligns the message shortcut implementation with the CLI’s “title” terminology by renaming the internal positional argument variable from subject to title, while keeping the SDK request field name Subject unchanged (API-level).
Changes:
- Rename the local
subjectvariable totitleinsideNewMessageCmd. - Update stale test comments that referenced “subject” to “title”.
- Preserve SDK request field naming (
req.Subject) for compatibility.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/commands/messages.go | Renames the message shortcut’s internal positional arg variable to title and wires it to CreateMessageRequest.Subject. |
| internal/commands/messages_test.go | Updates test comments to refer to “title” instead of “subject”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Review carefully before merging. Consider a major version bump. |
The create subcommand and all CLI flags already say "title" — only the shortcut's internal variable name was still called subject. Aligns code with the user-facing terminology. SDK field remains Subject (the API-level name).
TestMessagesCreateShowsHelpWithoutSubject → WithoutTitle TestMessageShortcutShowsHelpWithoutSubject → WithoutTitle
845b1d4 to
06158cf
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
subjectvariable totitleinNewMessageCmdshortcutSubjectunchanged (API-level name)Context
DHH feedback card 9660630993 — the CLI surface (
Usestrings, flags, create subcommand) already says "title" everywhere; only the shortcut's internal variable name was inconsistent.Test plan
bin/cipassessubjectin messages.go — only SDK-levelreq.SubjectremainsSummary by cubic
Renamed the internal
subjectvariable totitlein theNewMessageCmdshortcut to match CLI terminology. Updated test function names and comments to use "title" (and "body" where relevant); the SDK request still setsSubjectfor the API field.Written for commit 06158cf. Summary will update on new commits.