aboutsummaryrefslogtreecommitdiffstats
path: root/services/webhook/msteams.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/webhook/msteams.go')
-rw-r--r--services/webhook/msteams.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/services/webhook/msteams.go b/services/webhook/msteams.go
index ed5e659058..2b88bb23ff 100644
--- a/services/webhook/msteams.go
+++ b/services/webhook/msteams.go
@@ -8,7 +8,7 @@ import (
"fmt"
"strings"
- "code.gitea.io/gitea/models"
+ webhook_model "code.gitea.io/gitea/models/webhook"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/json"
api "code.gitea.io/gitea/modules/structs"
@@ -206,7 +206,7 @@ func (m *MSTeamsPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader,
}
// Review implements PayloadConvertor Review method
-func (m *MSTeamsPayload) Review(p *api.PullRequestPayload, event models.HookEventType) (api.Payloader, error) {
+func (m *MSTeamsPayload) Review(p *api.PullRequestPayload, event webhook_model.HookEventType) (api.Payloader, error) {
var text, title string
var color int
switch p.Action {
@@ -220,11 +220,11 @@ func (m *MSTeamsPayload) Review(p *api.PullRequestPayload, event models.HookEven
text = p.Review.Content
switch event {
- case models.HookEventPullRequestReviewApproved:
+ case webhook_model.HookEventPullRequestReviewApproved:
color = greenColor
- case models.HookEventPullRequestReviewRejected:
+ case webhook_model.HookEventPullRequestReviewRejected:
color = redColor
- case models.HookEventPullRequestComment:
+ case webhook_model.HookEventPullRequestComment:
color = greyColor
default:
color = yellowColor
@@ -283,7 +283,7 @@ func (m *MSTeamsPayload) Release(p *api.ReleasePayload) (api.Payloader, error) {
}
// GetMSTeamsPayload converts a MSTeams webhook into a MSTeamsPayload
-func GetMSTeamsPayload(p api.Payloader, event models.HookEventType, meta string) (api.Payloader, error) {
+func GetMSTeamsPayload(p api.Payloader, event webhook_model.HookEventType, meta string) (api.Payloader, error) {
return convertPayloader(new(MSTeamsPayload), p, event)
}