Method: Gitlab::Client::Repositories#compare

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

#compare(project, from, to) ⇒ Gitlab::ObjectifiedHash Also known as: repo_compare

Compares branches, tags or commits.

Examples:

Gitlab.compare(42, 'master', 'feature/branch')
Gitlab.repo_compare(42, 'master', 'feature/branch')

Parameters:

  • project (Integer)

    The ID of a project.

  • from (String)

    The commit SHA or branch name of from branch.

  • to (String)

    The commit SHA or branch name of to branch.

Returns:



58
59
60
# File 'lib/gitlab/client/repositories.rb', line 58

def compare(project, from, to)
  get("/projects/#{url_encode project}/repository/compare", query: { from: from, to: to })
end