Module: Gitlab::Client::Repositories
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/repositories.rb
Overview
Defines methods related to repositories.
Instance Method Summary collapse
-
#commit(project, sha) ⇒ Gitlab::ObjectifiedHash
(also: #repo_commit)
Gets a specific commit identified by the commit hash or name of a branch or tag.
-
#commit_diff(project, sha) ⇒ Gitlab::ObjectifiedHash
(also: #repo_commit_diff)
Get the diff of a commit in a project.
-
#commits(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
(also: #repo_commits)
Gets a list of project commits.
-
#tags(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
(also: #repo_tags)
Gets a list of project repository tags.
Instance Method Details
#commit(project, sha) ⇒ Gitlab::ObjectifiedHash Also known as: repo_commit
Gets a specific commit identified by the commit hash or name of a branch or tag.
45 46 47 |
# File 'lib/gitlab/client/repositories.rb', line 45 def commit(project, sha) get("/projects/#{project}/repository/commits/#{sha}") end |
#commit_diff(project, sha) ⇒ Gitlab::ObjectifiedHash Also known as: repo_commit_diff
Get the diff of a commit in a project.
59 60 61 |
# File 'lib/gitlab/client/repositories.rb', line 59 def commit_diff(project, sha) get("/projects/#{project}/repository/commits/#{sha}/diff") end |
#commits(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash> Also known as: repo_commits
Gets a list of project commits.
31 32 33 |
# File 'lib/gitlab/client/repositories.rb', line 31 def commits(project, ={}) get("/projects/#{project}/repository/commits", :query => ) end |
#tags(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash> Also known as:
Gets a list of project repository tags.
14 15 16 |
# File 'lib/gitlab/client/repositories.rb', line 14 def (project, ={}) get("/projects/#{project}/repository/tags", :query => ) end |