Skip to content

Trigger `project_update` system hook when archiving projects

James Ramsay (ex-GitLab) requested to merge jr-archive-hook into master

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?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/42275

Edited by Nick Thomas

Merge request reports

Loading