lib/lhj/command/yapi.rb in lhj-tools-0.2.25 vs lib/lhj/command/yapi.rb in lhj-tools-0.2.26

- old
+ new

@@ -28,10 +28,11 @@ def initialize(argv) @id = argv.option('id') @model_pre_name = argv.option('model-pre') @model_result_name = argv.option('model-name') + @webhook = argv.option('webhook') @language = argv.option('lan', 'oc') @save = argv.flag?('save', false) @sync = argv.flag?('sync', false) @notify = argv.flag?('notify', false) @debug = argv.flag?('debug', false) @@ -239,10 +240,10 @@ def model_suffix @config_model_suffix || 'Model' end def robot_url - @config_robot_url || 'https://oapi.dingtalk.com/robot/send?access_token=fe879fd3e7a3b5e59d5719b2384845b7884901919be5a78fe443cbf777869807' + @webhook || @config_robot_url || 'https://oapi.dingtalk.com/robot/send?access_token=fe879fd3e7a3b5e59d5719b2384845b7884901919be5a78fe443cbf777869807' end def property_mapper @config_property_mapper || { 'id' => 'gid' } end