Files
plugin-drone-gitea-message/message.go
T
Johannes Zottele 5b3a8f6935 initial version
2024-04-15 14:52:11 +02:00

28 lines
417 B
Go

package main
import (
"code.gitea.io/sdk/gitea"
)
type messageClient struct {
Client *gitea.Client
Owner string
Repo string
Index int64
Title string
Message string
}
func (mc *messageClient) sendMessage() (*gitea.Comment, *gitea.Response, error) {
opt := gitea.CreateIssueCommentOption{
Body: mc.Message,
}
return mc.Client.CreateIssueComment(
mc.Owner,
mc.Repo,
mc.Index,
opt,
)
}