Method: Gitlab::Client::RepositoryFiles#get_file_blame

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

#get_file_blame(project, file_path, ref) ⇒ Gitlab::ObjectifiedHash

Get file blame from repository

Examples:

Gitlab.get_file_blame(42, "README.md", "master")

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • file_path (String)

    The full path of the file.

  • ref (String)

    The name of branch, tag or commit.

Returns:

[View source]

38
39
40
41
42
# File 'lib/gitlab/client/repository_files.rb', line 38

def get_file_blame(project, file_path, ref)
  get("/projects/#{url_encode project}/repository/files/#{url_encode file_path}/blame", query: {
        ref: ref
      })
end