back interdiff of round #1 and #0

appview/notify: merge NewPullClosed/Merged/Reopen to NewPullState #711

merged
opened by boltless.me targeting master from boltless.me/core: feat/search

same to NewIssueState, we can determine the detailed event type from latest pull state

Signed-off-by: Seongmin Lee git@boltless.me

files
appview
ERROR
appview/indexer/notifier.go

Failed to calculate interdiff for this file.

ERROR
appview/notify/db/db.go

Failed to calculate interdiff for this file.

ERROR
appview/notify/merged_notifier.go

Failed to calculate interdiff for this file.

ERROR
appview/notify/notifier.go

Failed to calculate interdiff for this file.

ERROR
appview/notify/posthog/notifier.go

Failed to calculate interdiff for this file.

NEW
appview/pulls/pulls.go
···
// notify about the pull merge
for _, p := range pullsToMerge {
-
s.notifier.NewPullMerged(r.Context(), p)
+
s.notifier.NewPullState(r.Context(), p)
s.pages.HxLocation(w, fmt.Sprintf("/@%s/%s/pulls/%d", f.OwnerHandle(), f.Name, pull.PullId))
···
for _, p := range pullsToClose {
-
s.notifier.NewPullClosed(r.Context(), p)
+
s.notifier.NewPullState(r.Context(), p)
s.pages.HxLocation(w, fmt.Sprintf("/%s/pulls/%d", f.OwnerSlashRepo(), pull.PullId))
···
for _, p := range pullsToReopen {
-
s.notifier.NewPullReopen(r.Context(), p)
+
s.notifier.NewPullState(r.Context(), p)
s.pages.HxLocation(w, fmt.Sprintf("/%s/pulls/%d", f.OwnerSlashRepo(), pull.PullId))