moul / node-gitlab

DEPRECATED, see https://github.com/node-gitlab/node-gitlab
https://npmjs.org/package/gitlab
Other
470 stars 140 forks source link

Wrong implementation in merge_requests add #111

Closed geeeeeeeeek closed 8 years ago

geeeeeeeeek commented 8 years ago
add: (projectId, sourceBranch, targetBranch, assigneeId, title, fn = null) =>
    @debug "Projects::addMergeRequest()"
    params =
      id:            Utils.parseProjectId projectId
      source_branch: sourceBranch
      target_branch: targetBranch
      assignee_id:   parseInt assigneeId
      title:         title
    @post "projects/#{Utils.parseProjectId projectId}/merge_requests", params, (data) => fn data if fn

According to Gitlab API doc:

Parameters:

assignee_id should be optional. But passing a undefined into parseInt returns NaN, which would be a wrong parameter to call the API.