Github issues迁移,title 长度处理
This commit is contained in:
parent
b80ed537fc
commit
9979ae6d3a
|
@ -68,7 +68,8 @@ namespace :batch_add_issues do
|
||||||
UserExtension.create!(user_id: user.id)
|
UserExtension.create!(user_id: user.id)
|
||||||
puts "import_user batch success: phone #{phone} email: #{email}"
|
puts "import_user batch success: phone #{phone} email: #{email}"
|
||||||
end
|
end
|
||||||
|
title = issue['title']
|
||||||
|
title = title[0..190] if title.size > 190
|
||||||
issue_params = {
|
issue_params = {
|
||||||
:status_id => issue_status,
|
:status_id => issue_status,
|
||||||
:priority_id => priority,
|
:priority_id => priority,
|
||||||
|
@ -76,7 +77,7 @@ namespace :batch_add_issues do
|
||||||
# :branch_name,
|
# :branch_name,
|
||||||
# :start_date,
|
# :start_date,
|
||||||
# :due_date,
|
# :due_date,
|
||||||
:subject => issue['title'],
|
:subject => title,
|
||||||
:description => issue['body'],
|
:description => issue['body'],
|
||||||
# :blockchain_token_num,
|
# :blockchain_token_num,
|
||||||
:issue_tag_ids => [],
|
:issue_tag_ids => [],
|
||||||
|
|
Loading…
Reference in New Issue