Method: Gitlab::Client::RepositoryFiles#file_contents
- Defined in:
- lib/gitlab/client/repository_files.rb
permalink #file_contents(project, filepath, ref = 'master') ⇒ String Also known as: repo_file_contents
Get the contents of a file
19 20 21 22 23 24 25 |
# File 'lib/gitlab/client/repository_files.rb', line 19 def file_contents(project, filepath, ref = 'master') get "/projects/#{url_encode project}/repository/files/#{url_encode filepath}/raw", query: { ref: ref }, format: nil, headers: { Accept: 'text/plain' }, parser: ::Gitlab::Request::Parser end |