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.
-
#create_tag(project, tag_name, ref) ⇒ Gitlab::ObjectifiedHash
(also: #repo_create_tag)
Creates a new project repository tag.
-
#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.
59 60 61 |
# File 'lib/gitlab/client/repositories.rb', line 59 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.
73 74 75 |
# File 'lib/gitlab/client/repositories.rb', line 73 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.
45 46 47 |
# File 'lib/gitlab/client/repositories.rb', line 45 def commits(project, ={}) get("/projects/#{project}/repository/commits", :query => ) end |
#create_tag(project, tag_name, ref) ⇒ Gitlab::ObjectifiedHash Also known as: repo_create_tag
Creates a new project repository tag.
28 29 30 |
# File 'lib/gitlab/client/repositories.rb', line 28 def create_tag(project, tag_name, ref) post("/projects/#{project}/repository/tags", body: {tag_name: tag_name, ref: ref}) 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 |