Github issues迁移,title 长度处理

This commit is contained in:
xxq250 2023-12-18 10:33:31 +08:00
parent 7b1d0e21ee
commit eaf389ecea
1 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,11 @@ namespace :batch_add_issues do
UserExtension.create!(user_id: user.id)
puts "import_user batch success: phone #{phone} email: #{email}"
end
if issue['labels'].present?
issue['labels'].each do |tag|
project.issue_tags.find_or_create_by!(name: tag['name'], description: tag['description'], color: "##{tag['color']}")
end
end
title = issue['title']
title = title[0..190] if title.size > 190