diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-22 18:06:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-22 18:06:55 +0300 |
commit | 793034a90509193ebf2ad14ed8e5eea10f7c6b4a (patch) | |
tree | c6326ec316c71dad77ab8f40b4eedf5093544403 /lib/gitlab/checks/project_created.rb | |
parent | e2d00f9148a5c87fe4f56e4fd3c90a9b3574f03b (diff) |
Add latest changes from gitlab-org/gitlab@master
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 |