Github issues迁移,标记
This commit is contained in:
parent
c6a38c06d0
commit
5fe9719cc9
|
@ -175,7 +175,9 @@ namespace :batch_add_issues do
|
|||
# Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(拒绝的)。 默认: open
|
||||
lists.each do |issue|
|
||||
next if issue['pull_request'].present?
|
||||
created_issue = Issue.find_by(project_id: project.id, subject: issue['title'])
|
||||
title = issue['title']
|
||||
title = title[0..190] if title.size > 190
|
||||
created_issue = Issue.find_by(project_id: project.id, subject: title)
|
||||
unless created_issue.present?
|
||||
priority = [1, 2, 3, 4].include?(issue['priority'].to_i) ? issue['priority'].to_i : 2
|
||||
issue_status = ["", "open", "progressing", "", "", "closed", "rejected"].index(issue['state'])
|
||||
|
@ -211,9 +213,6 @@ namespace :batch_add_issues do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
title = issue['title']
|
||||
title = title[0..190] if title.size > 190
|
||||
issue_params = {
|
||||
:status_id => issue_status,
|
||||
:priority_id => priority,
|
||||
|
|
Loading…
Reference in New Issue