Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Add CommitID to CreateMergeRequestDiscussionOptions
Browse files Browse the repository at this point in the history
While not explicitly stated in the documentation [1] the commit_id field
must be specified when creating a MR discussion (aka thread) with comments
on a commit.

Add a CommitID to the CreateMergeRequestDiscussionOptions struct.

[1] https://docs.gitlab.com/ee/api/discussions.html#create-new-merge-request-thread
Signed-off-by: Prarit Bhargava <[email protected]>
  • Loading branch information
prarit committed Sep 23, 2021
1 parent efd7769 commit 9efcf32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions discussions.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ func (s *DiscussionsService) GetMergeRequestDiscussion(pid interface{}, mergeReq
// https://docs.gitlab.com/ce/api/discussions.html#create-new-merge-request-thread
type CreateMergeRequestDiscussionOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"`
CommitID *string `url:"commit_id,omitempty" json:"commit_id,omitempty"`
CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
Position *NotePosition `url:"position,omitempty" json:"position,omitempty"`
}
Expand Down

0 comments on commit 9efcf32

Please sign in to comment.