mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-09 00:24:08 +00:00
fix(actions): no edited event triggered when a title is changed
When the title of an issue or a pull request is changed, the edited
event must be triggered, in the same way it is when the body of the
description is changed.
The web endpoints and the API endpoints for both pull requests and
issues rely on issue_service.ChangeTitle which calls
notify_service.IssueChangeTitle.
(cherry picked from commit f6000c3760
)
This commit is contained in:
parent
c65534ce02
commit
05787c3809
|
@ -55,10 +55,20 @@ func (n *actionsNotifier) NewIssue(ctx context.Context, issue *issues_model.Issu
|
|||
}).Notify(withMethod(ctx, "NewIssue"))
|
||||
}
|
||||
|
||||
func (n *actionsNotifier) IssueChangeTitle(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, _ string) {
|
||||
ctx = withMethod(ctx, "IssueChangeTitle")
|
||||
|
||||
n.issueChange(ctx, doer, issue)
|
||||
}
|
||||
|
||||
// IssueChangeContent notifies change content of issue
|
||||
func (n *actionsNotifier) IssueChangeContent(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldContent string) {
|
||||
func (n *actionsNotifier) IssueChangeContent(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, _ string) {
|
||||
ctx = withMethod(ctx, "IssueChangeContent")
|
||||
|
||||
n.issueChange(ctx, doer, issue)
|
||||
}
|
||||
|
||||
func (n *actionsNotifier) issueChange(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)
|
||||
|
|
Loading…
Reference in a new issue