diff options
author | Giteabot <teabot@gitea.io> | 2024-12-31 20:33:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-31 12:33:08 +0000 |
commit | 39cc72562b1f9607d9eb8141daa8050d4468aade (patch) | |
tree | 8e37029f860b88b373cba2928870bb41189617ed /services/actions | |
parent | bc83fb26ef228f4c6201292561f79d8a6a91c1de (diff) | |
download | gitea-39cc72562b1f9607d9eb8141daa8050d4468aade.tar.gz gitea-39cc72562b1f9607d9eb8141daa8050d4468aade.zip |
feat(action): issue change title notifications (#33050) (#33065)
Backport #33050 by appleboy
action file as below:
```yaml
name: Semantic Pull Request
on:
pull_request_target:
types: [edited]
```
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'services/actions')
-rw-r--r-- | services/actions/notifier.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/actions/notifier.go b/services/actions/notifier.go index a4ebdf9e88..67e33e7cce 100644 --- a/services/actions/notifier.go +++ b/services/actions/notifier.go @@ -58,7 +58,15 @@ func (n *actionsNotifier) NewIssue(ctx context.Context, issue *issues_model.Issu // IssueChangeContent notifies change content of issue func (n *actionsNotifier) IssueChangeContent(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldContent string) { ctx = withMethod(ctx, "IssueChangeContent") + n.notifyIssueChangeWithTitleOrContent(ctx, doer, issue) +} + +func (n *actionsNotifier) IssueChangeTitle(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldTitle string) { + ctx = withMethod(ctx, "IssueChangeTitle") + n.notifyIssueChangeWithTitleOrContent(ctx, doer, issue) +} +func (n *actionsNotifier) notifyIssueChangeWithTitleOrContent(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) { var err error if err = issue.LoadRepo(ctx); err != nil { log.Error("LoadRepo: %v", err) |