Method: Gitlab::Client::Commits#commit_merge_requests

Defined in:
lib/gitlab/client/commits.rb

#commit_merge_requests(project, commit, options = {}) ⇒ Array<Gitlab::ObjectifiedHash> Also known as: repo_commit_merge_requests

Gets a list of merge requests for a commit.

Introduced in Gitlab 10.7

Examples:

Gitlab.commit_merge_requests(5, 'c9f9662a9b1116c838b523ed64c6abdb4aae4b8b')

Parameters:

  • project (Integer)

    The ID of a project.

  • sha (String)

    The commit hash.

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :page (Integer)

    The page number.

  • :per_page (Integer)

    The number of results per page.

Returns:

See Also:

[View source]

211
212
213
# File 'lib/gitlab/client/commits.rb', line 211

def commit_merge_requests(project, commit, options = {})
  get("/projects/#{url_encode project}/repository/commits/#{commit}/merge_requests", query: options)
end