class Gitlab::Client # Defines methods related to merge requests. # @see https://docs.gitlab.com/ce/api/merge_requests.html module MergeRequests # Gets a list of project merge requests. # # @example # Gitlab.merge_requests(5) # Gitlab.merge_requests({ per_page: 40 }) # # @param [Integer] project The ID of a project. # @param [Hash] options A customizable set of options. # @option options [Integer] :page The page number. # @option options [Integer] :per_page The number of results per page. # @return [Array] def merge_requests(project, options={}) get("/projects/#{project}/merge_requests", query: options) end # Gets a single merge request. # # @example # Gitlab.merge_request(5, 36) # # @param [Integer] project The ID of a project. # @param [Integer] id The ID of a merge request. # @return ] The merge request's commits. def merge_request_commits(project, id) get("/projects/#{project}/merge_request/#{id}/commits") end end end