(p *api.CreatePayload)
| 80 | } |
| 81 | |
| 82 | func getDingtalkCreatePayload(p *api.CreatePayload) *DingtalkPayload { |
| 83 | refName := git.RefShortName(p.Ref) |
| 84 | refType := strings.Title(p.RefType) |
| 85 | |
| 86 | actionCard := NewDingtalkActionCard("View "+refType, p.Repo.HTMLURL+"/src/"+refName) |
| 87 | actionCard.Text += "# New " + refType + " Create Event" |
| 88 | actionCard.Text += "\n- Repo: **" + MarkdownLinkFormatter(p.Repo.HTMLURL, p.Repo.Name) + "**" |
| 89 | actionCard.Text += "\n- New " + refType + ": **" + MarkdownLinkFormatter(p.Repo.HTMLURL+"/src/"+refName, refName) + "**" |
| 90 | |
| 91 | return &DingtalkPayload{ |
| 92 | MsgType: "actionCard", |
| 93 | ActionCard: actionCard, |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | func getDingtalkDeletePayload(p *api.DeletePayload) *DingtalkPayload { |
| 98 | refName := git.RefShortName(p.Ref) |
no test coverage detected