aboutsummaryrefslogtreecommitdiffstats
path: root/services/notify/notifier.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-11-06 22:41:49 -0800
committerGitHub <noreply@github.com>2024-11-07 06:41:49 +0000
commit331e878e81d57235a53199383087c7649797a887 (patch)
tree736485bdb5b49956022587506315b652076cff2f /services/notify/notifier.go
parent145e26698791221b007c7dd460fb506cb0237235 (diff)
downloadgitea-331e878e81d57235a53199383087c7649797a887.tar.gz
gitea-331e878e81d57235a53199383087c7649797a887.zip
Add new event commit status creation and webhook implementation (#27151)
This PR introduces a new event which is similar as Github's. When a new commit status submitted, the event will be trigged. That means, now we can receive all feedback from CI/CD system in webhooks or other notify systems. ref: https://docs.github.com/en/webhooks/webhook-events-and-payloads#status Fix #20749
Diffstat (limited to 'services/notify/notifier.go')
-rw-r--r--services/notify/notifier.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/notify/notifier.go b/services/notify/notifier.go
index ed053a812a..29bbb5702b 100644
--- a/services/notify/notifier.go
+++ b/services/notify/notifier.go
@@ -6,6 +6,7 @@ package notify
import (
"context"
+ git_model "code.gitea.io/gitea/models/git"
issues_model "code.gitea.io/gitea/models/issues"
packages_model "code.gitea.io/gitea/models/packages"
repo_model "code.gitea.io/gitea/models/repo"
@@ -74,4 +75,6 @@ type Notifier interface {
PackageDelete(ctx context.Context, doer *user_model.User, pd *packages_model.PackageDescriptor)
ChangeDefaultBranch(ctx context.Context, repo *repo_model.Repository)
+
+ CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, commit *repository.PushCommit, sender *user_model.User, status *git_model.CommitStatus)
}