Class: CircleCI::CLI::Command::RetryCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- CircleCI::CLI::Command::RetryCommand
- Defined in:
- lib/circleci/cli/command/retry_command.rb
Class Method Summary collapse
Methods inherited from BaseCommand
build_number, project_name, reponame, setup_token, should_be_pretty
Class Method Details
.run(options) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/circleci/cli/command/retry_command.rb', line 8 def run() setup_token username, reponame = project_name().split('/') number = build_number_for(username, reponame, ) build = Response::Build.retry(username, reponame, number) if build&.username say "build #{username}/#{reponame} #{build.build_number} is triggered" else say "failed to trigger #{username}/#{reponame} #{number}" end end |