Module: Gitlab::CI::Client::Commits
- Included in:
- Gitlab::CI::Client
- Defined in:
- lib/gitlab/ci/client/commits.rb
Overview
Defines methods related to repository commits.
Instance Method Summary collapse
-
#commit(project, token, data) ⇒ Gitlab::ObjectifiedHash
(also: #create_commit)
Inform GitLab CI about new commit you want it to build.
-
#commits(project, token) ⇒ Array<Gitlab::ObjectifiedHash>
Get list of commits per project.
Instance Method Details
#commit(project, token, data) ⇒ Gitlab::ObjectifiedHash Also known as: create_commit
Inform GitLab CI about new commit you want it to build.
Parameters:
id (required) - The ID of a project
sha (required) - The commit hash
note (required) - Text of comment
path (optional) - The file path
line (optional) - The line number
line_type (optional) - The type of line (new or old)
38 39 40 |
# File 'lib/gitlab/ci/client/commits.rb', line 38 def commit(project, token, data) post("/commits", body: data.merge({ project_id: project, project_token: token })) end |
#commits(project, token) ⇒ Array<Gitlab::ObjectifiedHash>
Get list of commits per project
17 18 19 |
# File 'lib/gitlab/ci/client/commits.rb', line 17 def commits(project, token) get("/commits", body: { project_id: project, project_token: token }) end |