fix(show): include gitlab_id on notes in issue/MR detail views
The show command's NoteDetail and MrNoteDetail structs were missing gitlab_id, making individual notes unaddressable in robot mode output. This was inconsistent with the notes list command which already exposed gitlab_id. Without an identifier, agents consuming show output could not construct GitLab web URLs or reference specific notes for follow-up operations via glab. Added gitlab_id to: - NoteDetail / NoteDetailJson (issue discussions) - MrNoteDetail / MrNoteDetailJson (MR discussions) - Both SQL queries (shifted column indices accordingly) - Both From<&T> conversion impls Deliberately scoped to show command only — me/timeline/trace structs were evaluated and intentionally left unchanged because they serve different consumption patterns where note-level identity is not needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -398,6 +398,7 @@ pub struct DiscussionDetailJson {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct NoteDetailJson {
|
||||
pub gitlab_id: i64,
|
||||
pub author_username: String,
|
||||
pub body: String,
|
||||
pub created_at: String,
|
||||
@@ -458,6 +459,7 @@ impl From<&DiscussionDetail> for DiscussionDetailJson {
|
||||
impl From<&NoteDetail> for NoteDetailJson {
|
||||
fn from(note: &NoteDetail) -> Self {
|
||||
Self {
|
||||
gitlab_id: note.gitlab_id,
|
||||
author_username: note.author_username.clone(),
|
||||
body: note.body.clone(),
|
||||
created_at: ms_to_iso(note.created_at),
|
||||
@@ -497,6 +499,7 @@ pub struct MrDiscussionDetailJson {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct MrNoteDetailJson {
|
||||
pub gitlab_id: i64,
|
||||
pub author_username: String,
|
||||
pub body: String,
|
||||
pub created_at: String,
|
||||
@@ -542,6 +545,7 @@ impl From<&MrDiscussionDetail> for MrDiscussionDetailJson {
|
||||
impl From<&MrNoteDetail> for MrNoteDetailJson {
|
||||
fn from(note: &MrNoteDetail) -> Self {
|
||||
Self {
|
||||
gitlab_id: note.gitlab_id,
|
||||
author_username: note.author_username.clone(),
|
||||
body: note.body.clone(),
|
||||
created_at: ms_to_iso(note.created_at),
|
||||
|
||||
Reference in New Issue
Block a user