Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing field in the DiscussionNotePositionTextSchema #3567

Closed
2 tasks done
harjotgill opened this issue Apr 4, 2024 · 2 comments · Fixed by #3572
Closed
2 tasks done

Missing field in the DiscussionNotePositionTextSchema #3567

harjotgill opened this issue Apr 4, 2024 · 2 comments · Fixed by #3572
Labels
released This issue/pull request has been released. type:types Adding or enhancing typescript types

Comments

@harjotgill
Copy link

Description

Missing line_range field in the position schema for DiscussionNotePositionTextSchema.

  • Node.js version: N/A
  • Gitbeaker version: 40.0.2
  • Gitbeaker release (cli, rest, core, requester-utils): 40.0.2
  • OS & version: N/A

Steps to reproduce

Expected behaviour

Actual behaviour

Possible fixes

Checklist

  • I have checked that this is not a duplicate issue.
  • I have read the documentation.
@harjotgill
Copy link
Author

harjotgill commented Apr 4, 2024

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
Copy link
Owner

🚀 Issue was released in 40.0.3 🚀

@jdalrymple jdalrymple added the released This issue/pull request has been released. label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released. type:types Adding or enhancing typescript types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants