Method: Gitlab::Client::Repositories#file_contents
- Defined in:
- lib/gitlab/client/repositories.rb
#file_contents(project, filepath, ref = 'master') ⇒ String Also known as: repo_file_contents
Get the contents of a file
15 16 17 18 19 20 21 |
# File 'lib/gitlab/client/repositories.rb', line 15 def file_contents(project, filepath, ref='master') ref = URI.encode(ref, /\W/) get "/projects/#{project}/repository/blobs/#{ref}?filepath=#{filepath}", format: nil, headers: { Accept: 'text/plain' }, parser: ::Gitlab::Request::Parser end |