Commit 634f7480 authored by 汪洋's avatar 汪洋

整理代码结构; 使用 require_all

parent b4087d17
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'httparty' require 'httparty'
require "ostruct" require "ostruct"
def login def login
# 登录 # 登录
options = { options = {
:body => {:os_username => " jaguar", :os_password => 'jaguar@GM123', :login => '%E7%99%BB%E5%BD%95' }, :body => {:os_username => " jaguar", :os_password => 'jaguar@GM123', :login => '%E7%99%BB%E5%BD%95' },
......
#!/usr/bin/ruby #!/usr/bin/ruby
require 'dingbot' require 'dingbot'
DingBot.endpoint = 'https://oapi.dingtalk.com/robot/send'
TEST_BOT = "0e53adfed496676b49931ab73092ce6dc206ced89fb66852be0906b5e3dcfa75" TEST_BOT = "0e53adfed496676b49931ab73092ce6dc206ced89fb66852be0906b5e3dcfa75"
def ding_text(bot_id, msg) def ding_text(bot_id, msg)
......
#!/usr/bin/ruby #!/usr/bin/ruby
require File.dirname(__FILE__) + '/ding' require_rel 'ding'
require File.dirname(__FILE__) + '/Confluence'
# 提前通知要过可行;当天也会提示 # 提前通知要过可行;当天也会提示
def ke_xing_notify() def ke_xing_notify()
...@@ -47,7 +46,7 @@ def notify_to_book_ke_xing_meeting_room() ...@@ -47,7 +46,7 @@ def notify_to_book_ke_xing_meeting_room()
end end
end end
# PMs-更美 app 大迭代 # PMs-更美 app 大迭代
PM_BOT = "7f105786f654bac5491b5ad808d24521e6fec5d8da8f8b6b7590c16a91a1c4fd" PM_BOT = "7f105786f654bac5491b5ad808d24521e6fec5d8da8f8b6b7590c16a91a1c4fd"
# 更美大迭代技术可行小组 # 更美大迭代技术可行小组
KEXING_BOT = "6565866a84fe1e879c06273d434152bfd7669d93153780ca34ec2792e0386c1c" KEXING_BOT = "6565866a84fe1e879c06273d434152bfd7669d93153780ca34ec2792e0386c1c"
......
#!/usr/bin/ruby #!/usr/bin/ruby
require File.dirname(__FILE__) + '/Confluence' require "require_all"
require File.dirname(__FILE__) + '/notify_release_date_by_email' require_rel 'confluence_request'
require File.dirname(__FILE__) + '/kexing_notify' require_rel 'notify_release_date_by_email'
require_rel 'kexing_notify'
$DEBUG = false $DEBUG = false
DingBot.endpoint = 'https://oapi.dingtalk.com/robot/send'
login login
notify_release_date_by_email notify_release_date_by_email
......
#!/usr/bin/ruby #!/usr/bin/ruby
# encoding: UTF-8 # encoding: UTF-8
require 'mail' require 'mail'
require 'dingbot' require_rel 'ding'
require File.dirname(__FILE__) + '/Confluence'
require File.dirname(__FILE__) + '/ding'
# 类似于“7.11开发”这样的事件名,用于对比记录邮件是否已经发送 # 类似于“7.11开发”这样的事件名,用于对比记录邮件是否已经发送
$dev_title = "" $dev_title = ""
......
DingBot.endpoint = 'https://oapi.dingtalk.com/robot/send'
DingBot.access_token = '8142e051fe21d101b7e619c179741b0502f99b66ede221e164c2c1643122378d'
def dingBot
message = DingBot::Message::Text.new(
'邮件发送失败,有可能是存在无效收件人',
['15811315780'],
false
)
DingBot.send_msg(message)
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment