diff options
author | Zettat123 <zettat123@gmail.com> | 2024-02-28 23:35:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 15:35:04 +0000 |
commit | 1ad4bb9eb7641a552c5b88a43eb91d59ec5c0edf (patch) | |
tree | effb42341d3b8a792a7d0e12ed3e3b15be938e67 /services | |
parent | 82405f808d7b50c3580f26e5ca645e2ed6d284ab (diff) | |
download | gitea-1ad4bb9eb7641a552c5b88a43eb91d59ec5c0edf.tar.gz gitea-1ad4bb9eb7641a552c5b88a43eb91d59ec5c0edf.zip |
Fix workflow trigger event bugs (#29467)
1. Fix incorrect `HookEventType` for issue-related events in
`IssueChangeAssignee`
2. Add `case "types"` in the `switch` block in `matchPullRequestEvent`
to avoid warning logs
Diffstat (limited to 'services')
-rw-r--r-- | services/actions/notifier.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/services/actions/notifier.go b/services/actions/notifier.go index e144484dab..1e99c51a8b 100644 --- a/services/actions/notifier.go +++ b/services/actions/notifier.go @@ -152,7 +152,13 @@ func (n *actionsNotifier) IssueChangeAssignee(ctx context.Context, doer *user_mo } else { action = api.HookIssueAssigned } - notifyIssueChange(ctx, doer, issue, webhook_module.HookEventPullRequestAssign, action) + + hookEvent := webhook_module.HookEventIssueAssign + if issue.IsPull { + hookEvent = webhook_module.HookEventPullRequestAssign + } + + notifyIssueChange(ctx, doer, issue, hookEvent, action) } // IssueChangeMilestone notifies assignee to notifiers |