mirror of
https://github.com/go-gitea/gitea
synced 2025-07-14 22:47:21 +00:00
Fix incompleted commit status events
This commit is contained in:
@ -303,6 +303,20 @@ func (m msteamsConvertor) Package(p *api.PackagePayload) (MSTeamsPayload, error)
|
||||
), nil
|
||||
}
|
||||
|
||||
func (m msteamsConvertor) CommitStatus(p *api.CommitStatusPayload) (MSTeamsPayload, error) {
|
||||
text, color := getCommitStatusPayloadInfo(p, noneLinkFormatter, true)
|
||||
|
||||
return createMSTeamsPayload(
|
||||
p.Repo,
|
||||
p.Sender,
|
||||
text,
|
||||
"",
|
||||
p.Commit.URL,
|
||||
color,
|
||||
&MSTeamsFact{"CommitStatus:", p.Commit.ID},
|
||||
), nil
|
||||
}
|
||||
|
||||
func createMSTeamsPayload(r *api.Repository, s *api.User, title, text, actionTarget string, color int, fact *MSTeamsFact) MSTeamsPayload {
|
||||
facts := make([]MSTeamsFact, 0, 2)
|
||||
if r != nil {
|
||||
|
Reference in New Issue
Block a user