Class: Openlayer::Resources::Commits

Inherits:
Object
  • Object
show all
Defined in:
lib/openlayer/resources/commits.rb,
lib/openlayer/resources/commits/test_results.rb

Defined Under Namespace

Classes: TestResults

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Commits

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Commits.

Parameters:



32
33
34
35
# File 'lib/openlayer/resources/commits.rb', line 32

def initialize(client:)
  @client = client
  @test_results = Openlayer::Resources::Commits::TestResults.new(client: client)
end

Instance Attribute Details

#test_resultsOpenlayer::Resources::Commits::TestResults (readonly)



7
8
9
# File 'lib/openlayer/resources/commits.rb', line 7

def test_results
  @test_results
end

Instance Method Details

#retrieve(project_version_id, request_options: {}) ⇒ Openlayer::Models::CommitRetrieveResponse

Retrieve a project version (commit) by its id.

Parameters:

  • project_version_id (String)

    The project version (commit) id.

  • request_options (Openlayer::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



20
21
22
23
24
25
26
27
# File 'lib/openlayer/resources/commits.rb', line 20

def retrieve(project_version_id, params = {})
  @client.request(
    method: :get,
    path: ["versions/%1$s", project_version_id],
    model: Openlayer::Models::CommitRetrieveResponse,
    options: params[:request_options]
  )
end