[go: up one dir, main page]

Skip to content

Group#execute_hooks should automatically execute system hooks

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

This issue came from this discussion !177803 (comment 2298582249).

About

In the docs being added in !177803 (merged), it explains how system hooks are executed when project webhooks are triggered (when Project#execute_hooks is called).

Problem

However, the same does not happen when Group#execute_hooks is called.

From what I can see, for example, in Member and its EE-appended module we need to manually trigger system hooks in addition to triggering group hooks, when if Group#execute_hooks had the same logic as Project#execute_hooks to execute system hooks at the same time we wouldn't need to do this.

Proposal

As part of issue refinement, we need to first verify that this change should happen, by inspecting current calls to Group#execute_hooks and to check that the logic of also executing system hooks at the same time should indeed happen.

If we determine that it should not happen

We should update the section of #execute_hooks being added in !177803 (merged) to explain why this is the case.

If we determine that it should happen

We should update the FOSS Group#execute_hooks method to execute system hooks (system hooks is FOSS feature). We must also then update existing areas that manually call system hooks in addition to group hooks - for example Member model mentioned above, and there may be others - so we don't end up having system hooks execute twice in this case.

We should update the section of #execute_hooks being added in !177803 (merged) to mention that when called on a group, system hooks also automatically execute.

We should wrap all changes in a feature flag.

Edited by 🤖 GitLab Bot 🤖