diff options
Diffstat (limited to 'lib/gitlab/checks/project_created.rb')
-rw-r--r-- | lib/gitlab/checks/project_created.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/gitlab/checks/project_created.rb b/lib/gitlab/checks/project_created.rb index 362562068e9..ea3be883be6 100644 --- a/lib/gitlab/checks/project_created.rb +++ b/lib/gitlab/checks/project_created.rb @@ -21,8 +21,16 @@ module Gitlab private - def self.message_key(user_id, project_id) - "#{PROJECT_CREATED}:#{user_id}:#{project_id}" + def self.message_key(user, repository) + "#{PROJECT_CREATED}:#{user.id}:#{repository.gl_repository}" + end + + # TODO: Remove in the next release + # https://gitlab.com/gitlab-org/gitlab/-/issues/292030 + def self.legacy_message_key(user, repository) + return unless repository.project + + "#{PROJECT_CREATED}:#{user.id}:#{repository.project.id}" end def project_url |