Class: Rosette::Core::Commands::EnqueueCommitCommand

Inherits:
GitCommand show all
Includes:
WithRef, WithRepoName
Defined in:
lib/rosette/core/commands/queuing/enqueue_commit_command.rb

Overview

Enqueues a commit for processing on Rosette's configured queue.

Examples:

EnqueueCommitCommand.new(configuration)
  .set_repo_name('my_repo')
  .set_ref('master')
  .execute
EnqueueCommitCommand.new(configuration)
  .set_repo_name('my_repo')
  .set_commit_id('67f0e9a60dfe39430b346086f965e6c94a8ddd24')
  .execute

See Also:

Instance Attribute Summary

Attributes included from WithRef

#commit_str

Attributes included from WithRepoName

#repo_name

Attributes inherited from Command

#configuration

Instance Method Summary collapse

Methods included from WithRef

#commit_id, #set_commit_id, #set_ref

Methods included from WithRepoName

#set_repo_name

Methods inherited from GitCommand

#valid?

Methods inherited from Command

#initialize, #messages, #valid?, validate, validators

Constructor Details

This class inherits a constructor from Rosette::Core::Commands::Command

Instance Method Details

#executeObject


26
27
28
29
30
31
32
# File 'lib/rosette/core/commands/queuing/enqueue_commit_command.rb', line 26

def execute
  conductor = Rosette::Queuing::Commits::CommitConductor.new(
    configuration, repo_name, Rosette.logger
  )

  conductor.enqueue(commit_id)
end