Commit ee05bed0 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg Committed by Adam Hegyi

Update programming language colors and metadata

When linguist was phased out the data we depended on was vendored. This
created some stale data since than, and this commit updates the vendored
file to the file upstream has at 7.11.0. This version number was choosen
as Gitaly will shortly run `github-linguist` at that version.

Than this updated file is used to update the colors in the database, for
records already in the database. About 200 `UPDATE` statements are
executed.
parent c60be175
---
title: Update programming language colors and metadata
merge_request: 43111
author:
type: changed
# frozen_string_literal: true
require 'yaml'
class UpdateProgrammingLanguageColors < ActiveRecord::Migration[6.0]
DOWNTIME = false
class ProgrammingLanguage < ActiveRecord::Base; end
def up
YAML.load_file("vendor/languages.yml").each do |name, metadata|
color = metadata["color"]
next unless color.present?
ProgrammingLanguage.where(name: name).update(color: color)
end
end
def down
# noop
end
end
f19e61e3863905885c8b5b2129be2586d912d616a5b3b54e99a72c5760082059
\ No newline at end of file
This diff is collapsed.
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