Hi, Thanks for your participation in Kunpeng and software ecosystem!
- Your Job: #{@job_id} had finished.
- Bellow are comparsion result of the base_commit and current_commit:
- \tbase_commit: #{@job['base_commit']}
- \tcurrent_commit: #{@job['upstream_commit']}
- Bellow are comparsion result of the base commit and your commit:
- \tbase commit: #{@job['base_commit']}
- \tcommit_link: #{@job['upstream_url']}/commit/#{@job['base_commit']}
- \tyour commit: #{@job['upstream_commit']}
- \tbranch: #{@job['upstream_branch']}
- \tcommit_link: #{@job['upstream_url']}/commit/#{@job['upstream_commit']}
- compare upstream_commit=#{@job['base_commit']} upstream_commit=#{@job['upstream_commit']} --min_samples #{@job['nr_run']} #{context.to_s} \n\n#{signature}" BODY
@@ -86,3 +91,15 @@ def get_compare_result(job) m_titles = [base_commit.slice(0, 16), commit_id.slice(0, 24)] compare_matrixes(matrices_list, suite_list, nil, m_titles, options: options) end
+def keep_100_lines(context)
- num = 0
- new_context = ''
- context.each_line do |line|
- new_context += line
- num += 1
- break if num > 99
- end
you do not need to handle it line by line, you can get the first 100 lines with: context.split("\n")[0,100].join("\n")
Thanks, Luan Shengde
- new_context
+end
2.23.0