Commit 38f2c399 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Always truncate GitHub context name down to 255 chars

parent df56ba11
......@@ -15,11 +15,7 @@ class GithubService
end
def context
if @service.static_context?
"ci/gitlab/#{::Gitlab.config.gitlab.host}"
else
"ci/gitlab/#{@ref_name}".truncate(255)
end
context_name.truncate(255)
end
def description
......@@ -58,5 +54,15 @@ class GithubService
def self.from_pipeline_data(project, service, data)
new(project, service, data[:object_attributes])
end
private
def context_name
if @service.static_context?
"ci/gitlab/#{::Gitlab.config.gitlab.host}"
else
"ci/gitlab/#{@ref_name}"
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