forked from mirrors/forgejo
chore: Dead Code: DeleteIssue Notify Topic (#10046)
My analysis (https://chris-besch.com/articles/forgejo_pub_sub_pattern_history) shows that the `DeleteIssue` notify topic is sent by the `services/issue` package but not received by anyone. Thus, this is dead we want to delete. The topic is only used in https://codeberg.org/forgejo/forgejo/src/branch/forgejo/services/issue/issue.go#L201 and handled in https://codeberg.org/forgejo/forgejo/src/branch/forgejo/services/notify/notify.go#L79-L84 . closes #9990 ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [ ] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10046 Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org> Co-authored-by: christopher-besch <mail@chris-besch.com> Co-committed-by: christopher-besch <mail@chris-besch.com>
This commit is contained in:
parent
a9452d11d0
commit
be6d96b9f6
4 changed files with 0 additions and 14 deletions
|
|
@ -198,8 +198,6 @@ func DeleteIssue(ctx context.Context, doer *user_model.User, gitRepo *git.Reposi
|
|||
}
|
||||
}
|
||||
|
||||
notify_service.DeleteIssue(ctx, doer, issue)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ type Notifier interface {
|
|||
|
||||
NewIssue(ctx context.Context, issue *issues_model.Issue, mentions []*user_model.User)
|
||||
IssueChangeStatus(ctx context.Context, doer *user_model.User, commitID string, issue *issues_model.Issue, actionComment *issues_model.Comment, closeOrReopen bool)
|
||||
DeleteIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Issue)
|
||||
IssueChangeMilestone(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldMilestoneID int64)
|
||||
IssueChangeAssignee(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, assignee *user_model.User, removed bool, comment *issues_model.Comment)
|
||||
PullRequestReviewRequest(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, reviewer *user_model.User, isRequest bool, comment *issues_model.Comment)
|
||||
|
|
|
|||
|
|
@ -76,13 +76,6 @@ func IssueChangeStatus(ctx context.Context, doer *user_model.User, commitID stri
|
|||
}
|
||||
}
|
||||
|
||||
// DeleteIssue notify when some issue deleted
|
||||
func DeleteIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) {
|
||||
for _, notifier := range notifiers {
|
||||
notifier.DeleteIssue(ctx, doer, issue)
|
||||
}
|
||||
}
|
||||
|
||||
// MergePullRequest notifies merge pull request to notifiers
|
||||
func MergePullRequest(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest) {
|
||||
for _, notifier := range notifiers {
|
||||
|
|
|
|||
|
|
@ -37,10 +37,6 @@ func (*NullNotifier) NewIssue(ctx context.Context, issue *issues_model.Issue, me
|
|||
func (*NullNotifier) IssueChangeStatus(ctx context.Context, doer *user_model.User, commitID string, issue *issues_model.Issue, actionComment *issues_model.Comment, isClosed bool) {
|
||||
}
|
||||
|
||||
// DeleteIssue notify when some issue deleted
|
||||
func (*NullNotifier) DeleteIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) {
|
||||
}
|
||||
|
||||
// NewPullRequest places a place holder function
|
||||
func (*NullNotifier) NewPullRequest(ctx context.Context, pr *issues_model.PullRequest, mentions []*user_model.User) {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue