Skip to content

Commit d405143

Browse files
author
Earl Warren
committed
Merge pull request 'fix(actions): no edited event triggered when a title is changed' (go-gitea#4618) from twenty-panda/forgejo:wip-notify-title into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4618 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2 parents fdb1874 + f6000c3 commit d405143

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

services/actions/notifier.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,20 @@ func (n *actionsNotifier) NewIssue(ctx context.Context, issue *issues_model.Issu
5555
}).Notify(withMethod(ctx, "NewIssue"))
5656
}
5757

58+
func (n *actionsNotifier) IssueChangeTitle(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, _ string) {
59+
ctx = withMethod(ctx, "IssueChangeTitle")
60+
61+
n.issueChange(ctx, doer, issue)
62+
}
63+
5864
// IssueChangeContent notifies change content of issue
59-
func (n *actionsNotifier) IssueChangeContent(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldContent string) {
65+
func (n *actionsNotifier) IssueChangeContent(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, _ string) {
6066
ctx = withMethod(ctx, "IssueChangeContent")
6167

68+
n.issueChange(ctx, doer, issue)
69+
}
70+
71+
func (n *actionsNotifier) issueChange(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) {
6272
var err error
6373
if err = issue.LoadRepo(ctx); err != nil {
6474
log.Error("LoadRepo: %v", err)

0 commit comments

Comments
 (0)