Commit 9d01fb01 by Tấn Trần Thanh

case user input not link issue

parent e074c4a1
Pipeline #1599 canceled with stages
in 0 seconds
......@@ -93,7 +93,10 @@ module WorkflowReport
result[column].push(sum_hours_record[status].to_i >= 0 ? sum_hours_record[status] : '')
end
end
if jp_request.present?
if jp_request.strip.blank?
result[32] << ''
result[33] << ''
else
jp_request = jp_request.strip
result[32] << jp_request
begin
......@@ -101,14 +104,13 @@ module WorkflowReport
if jp_request_arr.length >= 4 && jp_request_arr[3].to_i.positive?
issue_detail = github.issues.find user: jp_request_arr[0], repo: jp_request_arr[1], number: jp_request_arr[3]
result[33].push(issue_detail.success? ? issue_detail.comments : '')
else
result[33].push('') if result[33][result[0].length - 1].nil?
end
rescue => e
error_links << "##{root_id} Error occurred during the build with the ISSUE link:\r\n - #{jp_request} \r\n - #{e.message.gsub(/(?<=access_token=).*/, '123')}"
result[33].push('')
result[33].push('') if result[33][result[0].length - 1].nil?
end
else
result[32] << ''
result[33] << ''
end
# pr detail
pr = { pr_comments: 0, pr_review_comments: 0, pr_commits: 0, pr_changed_files: 0, pr_additions: 0, pr_deletions: 0 }
......
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