Skip to content

Commit

Permalink
internal/gitlab: fix argument name for UpdateMRDiscussionNote
Browse files Browse the repository at this point in the history
In UpdateMRDiscussionNote the object being handled is an MR ID/number
and not an issue ID/number as the argument name sugests. This is clearly
a copy-n-paste mistake.

Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
  • Loading branch information
bmeneg committed Jun 23, 2021
1 parent fe9248b commit aada9db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ func UpdateIssueDiscussionNote(project string, issueNum int, discussionID string

// UpdateMRDiscussionNote updates a specific discussion or note in the
// specified MR ID.
func UpdateMRDiscussionNote(project string, issueNum int, discussionID string, noteID int, body string) (string, error) {
func UpdateMRDiscussionNote(project string, mrNum int, discussionID string, noteID int, body string) (string, error) {
p, err := FindProject(project)
if err != nil {
return "", err
Expand All @@ -1565,7 +1565,7 @@ func UpdateMRDiscussionNote(project string, issueNum int, discussionID string, n
Body: &body,
}

note, _, err := lab.Discussions.UpdateMergeRequestDiscussionNote(p.ID, issueNum, discussionID, noteID, opts)
note, _, err := lab.Discussions.UpdateMergeRequestDiscussionNote(p.ID, mrNum, discussionID, noteID, opts)
if err != nil {
return "", err
}
Expand Down

0 comments on commit aada9db

Please sign in to comment.