Class: Gct::Command::Robot::Start
- Inherits:
-
Gct::Command::Robot
- Object
- CLAide::Command
- Gct::Command
- Gct::Command::Robot
- Gct::Command::Robot::Start
- Defined in:
- lib/gct/command/robot/start.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Start
constructor
A new instance of Start.
- #run ⇒ Object
Methods inherited from Gct::Command::Robot
Methods inherited from Gct::Command
#auto_add_tag, #check_branch_can_be_update, #config_gitlab, #current_branch, #file_contents, #get_project, #gitlab_error, run
Constructor Details
#initialize(argv) ⇒ Start
Returns a new instance of Start.
23 24 25 26 27 28 |
# File 'lib/gct/command/robot/start.rb', line 23 def initialize(argv) @project_name = ENV['CI_PROJECT_NAME'] @tag = ENV['CI_COMMIT_REF_NAME'] @test = argv.flag?('test', false) super end |
Class Method Details
.options ⇒ Object
17 18 19 20 21 |
# File 'lib/gct/command/robot/start.rb', line 17 def self. [ ['--test', '测试机器人,测试webhook'], ].concat(super) end |
Instance Method Details
#run ⇒ Object
30 31 32 33 34 |
# File 'lib/gct/command/robot/start.rb', line 30 def run = " <font color=\"info\">#{@tag}</font> 开始打tag" content = "**#{@project_name}** #{}" robot_send(content) end |