Trigger `project_update` system hook when archiving projects
What does this MR do?
System hooks are not triggered by project archive and unarchive events. These hooks should be triggered.
Reuse the Projects::UpdateService
to trigger the project_update
hook, as proposed by @DouweM https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16610#note_58437269
Testing:
-
Archive/Unarchive works via interface -
Archive/Unarchive works via API -
Verify system hooks fire
{"event_name":"project_update","created_at":"2018-08-02T19:32:04Z","updated_at":"2018-08-02T20:09:17Z","name":"archive-test-foo","path":"archive-test-foo","path_with_namespace":"jramsay/archive-test-foo","project_id":15,"owner_name":"James Ramsay","owner_email":"test@example.com","project_visibility":"public"}
Are there points in the code the reviewer needs to double check?
-
Archive/Unarchive works via interface -
Archive/Unarchive works via API -
Verify system hooks fire
Why was this MR needed?
System hooks are useful and should be triggered by important events in the project lifecycle, like project archive/unarchive.
Screenshots (if relevant)
n/a – no visible changes
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Conforms to the code review guidelines
-
Has been reviewed by a UX Designer -
Has been reviewed by a Frontend maintainer -
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
-
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Edited by Nick Thomas