mirror of
https://github.com/lddsb/drone-dingtalk-message.git
synced 2026-06-13 18:51:40 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c8bc5d889d | |||
| a651a73cbd |
@@ -5,7 +5,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
_ "github.com/joho/godotenv/autoload"
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@@ -210,6 +210,11 @@ func main() {
|
||||
},
|
||||
}
|
||||
|
||||
// kubernetes runner patch
|
||||
if _, err := os.Stat("/run/drone/env"); err == nil {
|
||||
godotenv.Overload("/run/drone/env")
|
||||
}
|
||||
|
||||
if err := app.Run(os.Args); nil != err {
|
||||
log.Println(err)
|
||||
}
|
||||
|
||||
@@ -345,12 +345,12 @@ func (p *Plugin) getEmoticon() string {
|
||||
func (p *Plugin) getPicURL() string {
|
||||
pics := make(map[string]string)
|
||||
// success picture url
|
||||
pics["success"] = "https://ws4.sinaimg.cn/large/006tNc79gy1fz05g5a7utj30he0bfjry.jpg"
|
||||
pics["success"] = "https://wx1.sinaimg.cn/large/006tNc79gy1fz05g5a7utj30he0bfjry.jpg"
|
||||
if p.Custom.Pic.SuccessPicURL != "" {
|
||||
pics["success"] = p.Custom.Pic.SuccessPicURL
|
||||
}
|
||||
// failure picture url
|
||||
pics["failure"] = "https://ws1.sinaimg.cn/large/006tNc79gy1fz0b4fghpnj30hd0bdmxn.jpg"
|
||||
pics["failure"] = "https://wx1.sinaimg.cn/large/006tNc79gy1fz0b4fghpnj30hd0bdmxn.jpg"
|
||||
if p.Custom.Pic.FailurePicURL != "" {
|
||||
pics["failure"] = p.Custom.Pic.FailurePicURL
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user