Commit 52c187e5 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add GitHub statuses static context checkbox config

parent 9406331e
......@@ -5,7 +5,8 @@ module EE
:multiproject_enabled,
:pass_unstable,
:project_name,
:repository_url
:repository_url,
:static_context
].freeze
def allowed_service_params
......
......@@ -3,6 +3,7 @@ class GithubService < Service
include ActionView::Helpers::UrlHelper
prop_accessor :token, :repository_url
boolean_accessor :static_context
delegate :api_url, :owner, :repository_name, to: :remote_project
......@@ -31,8 +32,20 @@ class GithubService < Service
def fields
[
{ type: 'text', name: "token", required: true, placeholder: "e.g. 8d3f016698e...", help: 'Create a <a href="https://github.com/settings/tokens">personal access token</a> with <code>repo:status</code> access granted and paste it here.'.html_safe },
{ type: 'text', name: "repository_url", title: 'Repository URL', required: true, placeholder: 'e.g. https://github.com/owner/repository' }
{ type: 'text',
name: "token",
required: true,
placeholder: "e.g. 8d3f016698e...",
help: 'Create a <a href="https://github.com/settings/tokens">personal access token</a> with <code>repo:status</code> access granted and paste it here.'.html_safe },
{ type: 'text',
name: "repository_url",
title: 'Repository URL',
required: true,
placeholder: 'e.g. https://github.com/owner/repository' },
{ type: 'checkbox',
name: "static_context",
title: 'Static status check names',
help: 'GitHub status checks need static name in order to be marked as "required".' }
]
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