Missing System Hook Event for transfering a group
Problem to solve
There are no System Hook Events for when roles change on projects and groups currently.
Intended users
Developers of APIs that rely on System Hooks to create an event based solution instead of a polling/syncing based solution.
Further details
In order to stay in sync with user permissions in Gitlab, there needs to be an event for the system hooks that is triggered when a group is transfered to another namespace. Currently no event happens for this. If you do not have this, you are needing to poll the API all the time to make sure you data is synced instead of writing an event based approach.
Proposal
I see one of 2 solutions:
Solution 1
For each project underneath a group (including subgroup projects), submit an event for project_transfer
. This would work for "OUR/MY" use case, but might be to specific for other people to use.
Solution 2 (and likely the more standard one)
Add the event group_transfer
to the System Hook.
{
"event_name": "group_transfer",
"created_at": "2019-07-26T11:04:18Z",
"updated_at": "2019-07-29T13:49:00Z",
"name": "sub_group",
"path": "sub_group8",
"full_path": "exciting_group/new_group/sub_group8",
"old_path": "sub_group8",
"old_full_path": "new_group/sub_group8",
"group_id": 55,
"owner_email": null,
"owner_name": null
}
Permissions and Security
N/A
Testing
Theoretically there shouldn't be any old functionality it would affect. That said, I am not familiar with the core code ;-)
What does success look like, and how can we measure that?
Success is the events are sent to the registered system hook APIs