Commit bd8dc9b5 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Make it clear that downstream trigger needs project path

parent 91a67a79
...@@ -27,7 +27,7 @@ module EE ...@@ -27,7 +27,7 @@ module EE
self.user self.user
end end
def target_project_name def target_project_path
options&.dig(:trigger, :project) options&.dig(:trigger, :project)
end end
......
...@@ -58,7 +58,7 @@ module Ci ...@@ -58,7 +58,7 @@ module Ci
def target_project def target_project
strong_memoize(:target_project) do strong_memoize(:target_project) do
Project.find_by_full_path(@bridge.target_project_name) Project.find_by_full_path(@bridge.target_project_path)
end end
end end
end end
......
...@@ -32,10 +32,10 @@ describe Ci::Bridge do ...@@ -32,10 +32,10 @@ describe Ci::Bridge do
end end
end end
describe '#target_project_name' do describe '#target_project_path' do
context 'when trigger is defined' do context 'when trigger is defined' do
it 'returns a full path of a project' do it 'returns a full path of a project' do
expect(bridge.target_project_name).to eq 'my/project' expect(bridge.target_project_path).to eq 'my/project'
end end
end end
...@@ -43,7 +43,7 @@ describe Ci::Bridge do ...@@ -43,7 +43,7 @@ describe Ci::Bridge do
let(:options) { { trigger: {} } } let(:options) { { trigger: {} } }
it 'returns nil' do it 'returns nil' do
expect(bridge.target_project_name).to be_nil expect(bridge.target_project_path).to be_nil
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment