Commit ffc9fe49 authored by Vladimir Shushlin's avatar Vladimir Shushlin

Fix empty labels for `pages:deploy` job

Use description of GenericCommitStatus as label if provided
Fallback to core status labels if not
parent 93a93174
---
title: Fix empty labels of CI builds for gitlab-pages on pipeline page
merge_request: 24451
author:
type: fixed
......@@ -6,7 +6,7 @@ module Gitlab
module External
module Common
def label
subject.description
subject.description || super
end
def has_details?
......
......@@ -11,7 +11,7 @@ describe Gitlab::Ci::Status::External::Common do
end
subject do
Gitlab::Ci::Status::Core
Gitlab::Ci::Status::Success
.new(external_status, user)
.extend(described_class)
end
......@@ -20,6 +20,14 @@ describe Gitlab::Ci::Status::External::Common do
it 'returns description' do
expect(subject.label).to eq external_description
end
context 'when description is not set' do
let(:external_description) { nil }
it 'uses core status label' do
expect(subject.label).to eq('passed')
end
end
end
describe '#has_action?' do
......
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