From e8d2c2579383897a1dd7f9debd359abe8ae8373d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 20 Jul 2021 09:55:51 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-1-stable-ee --- app/models/ci/job_token/project_scope_link.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models/ci/job_token') diff --git a/app/models/ci/job_token/project_scope_link.rb b/app/models/ci/job_token/project_scope_link.rb index 283ad4a190d..99118f8090b 100644 --- a/app/models/ci/job_token/project_scope_link.rb +++ b/app/models/ci/job_token/project_scope_link.rb @@ -19,6 +19,10 @@ module Ci validates :target_project, presence: true validate :not_self_referential_link + def self.for_source_and_target(source_project, target_project) + self.find_by(source_project: source_project, target_project: target_project) + end + private def not_self_referential_link -- cgit v1.2.1