Sha256: 8ed8af105be6caee756015a44e80f946d271e9a4fd98fc9cb38200e394aaa78c

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

# Defines methods related to deployments.
# @see https://docs.gitlab.com/ce/api/deployments.html
module Deployments
  # Gets a list of project deployments.
  #
  # @example
  #   Gitlab.deployments(5)
  #   Gitlab.deployments(5, { per_page: 10, page:  2 })
  #
  # @param  [Integer, String] project The ID or name of a project.
  # @param  [Hash] options A customizable set of options.
  # @option options [Integer] :page The page number.
  # @option options [Integer] :per_page The number of results per page.
  # @return [Array<Gitlab::ObjectifiedHash>]
  def deployments(project, options = {})
    get("/projects/#{url_encode project}/deployments", query: options)
  end

  # Gets a single deployment.
  #
  # @example
  #   Gitlab.deployment(5, 36)
  #
  # @param  [Integer, String] project The ID or name of a project.
  # @param  [Integer] id The ID of an deployment.
  # @return [Gitlab::ObjectifiedHash]
  def deployment(project, id)
    get("/projects/#{url_encode project}/deployments/#{id}")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gitlab-4.6.0 lib/gitlab/client/deployments.rb