Change static_context attribute for GitHub service on .com

!15737 (merged) updated the static_context attribute for new GithubService integrations to be true, but we have service templates defined for staging and .com which prevent this change.

Related issue: #9931 (comment 232298154)

Steps to reproduce:

Running the following query should return a Github service template with empty properties:

Service.where(template: true, type: 'GithubService').select(:id, :type, :properties)

Steps to fix:

  • remove the template from the rails console
  • update the template from the rails console

Updating the template from the admin panel does not work because there are HTML presence validations on the rest of the input fields.

How to update from the console:

template = Service.where(template: true, type: "GithubService").first
template.properties ||= {}
# add the new default behavior
template.properties.merge!(static_context: true)
template.save!
# double check the result
template.reload
puts template.properties.inspect

Steps to validate:

  • create a new empty project
  • go to Settings -> Integrations -> GitHub
  • Static status check names should be checked by default
Assignee Loading
Time tracking Loading