jdalrymple / gitbeaker

🦊🧪 A comprehensive and typed Gitlab SDK for Node.js, Browsers, Deno and CLI
Other
1.55k stars 294 forks source link

Missing field in the DiscussionNotePositionTextSchema #3567

Closed harjotgill closed 5 months ago

harjotgill commented 6 months ago

Description

Missing line_range field in the position schema for DiscussionNotePositionTextSchema.

Steps to reproduce

Expected behaviour

Actual behaviour

Possible fixes

Checklist

harjotgill commented 6 months ago

This is what I came up with based on what I see in the Webhook event for the DiffNote:

export interface DiscussionNotePositionTextLineSchema {
  line_code?: string;
  type?: 'new' | 'old';
  old_line?: number;
  new_line?: number;
}

export interface DiscussionNotePositionLineRangeSchema {
  start?: DiscussionNotePositionTextLineSchema;
  end?: DiscussionNotePositionTextLineSchema;
}

export type DiscussionNotePositionTextSchema = DiscussionNotePositionBaseSchema & {
  position_type: 'text';
  new_line?: string;
  old_line?: string;
  line_range?: DiscussionNotePositionLineRangeSchema;
};
jdalrymple commented 5 months ago

:rocket: Issue was released in 40.0.3 :rocket: