Signed-off-by: Cao Xueliang caoxl78320@163.com --- lib/git_bisect.rb | 2 +- lib/mail_bisect_result.rb | 4 ++-- sbin/git-bisect | 9 ++++----- 3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/lib/git_bisect.rb b/lib/git_bisect.rb index b4bbace..d9e5cf4 100644 --- a/lib/git_bisect.rb +++ b/lib/git_bisect.rb @@ -5,7 +5,7 @@ require 'json' require_relative 'es_query' require_relative 'sched_client' -require_relative "../src/delimiter/utils" +require_relative '../src/delimiter/utils' require_relative "#{ENV['LKP_SRC']}/lib/monitor"
# find the first bad commit diff --git a/lib/mail_bisect_result.rb b/lib/mail_bisect_result.rb index 8f1a0c0..1e85824 100644 --- a/lib/mail_bisect_result.rb +++ b/lib/mail_bisect_result.rb @@ -36,9 +36,9 @@ class MailBisectResult
https://gitee.com/openeuler/compass-ci BODY - to = "caoxl@crystal.ci" + to = 'caoxl@crystal.ci' @hash = { 'to' => to, 'body' => body, 'subject' => subject, 'from' => 'compass-ci@outlook.com' } - #@hash = { 'to' => @git_commit.author_email, 'body' => body, 'subject' => subject } + # @hash = { 'to' => @git_commit.author_email, 'body' => body, 'subject' => subject } end
def send_mail diff --git a/sbin/git-bisect b/sbin/git-bisect index a7f158e..4744a02 100755 --- a/sbin/git-bisect +++ b/sbin/git-bisect @@ -1,6 +1,7 @@ #!/usr/bin/env ruby # SPDX-License-Identifier: MulanPSL-2.0+ # frozen_string_literal: true + require_relative '../container/defconfig.rb' set_local_env require 'optparse' @@ -20,15 +21,13 @@ def parse_argv items end
-options = {} - op = OptionParser.new do |opts| opts.banner = 'Usage: git-bisect job_id=$job_id, error_id=$error_id'
- opts.separator'' + opts.separator '' opts.separator 'job_id: you submit a job to compass-ci and the job has some errors' opts.separator 'error_id: you want git bisect a error from the errors that you got' - opts.separator'' + opts.separator ''
opts.on_tail('-h', '--help', 'show the help message') do puts opts @@ -44,6 +43,6 @@ unless items['job_id'] || items['error_id'] end
gb = GitBisect.new(items) -result = gb.find_first_bad_commit() +result = gb.find_first_bad_commit mbr = MailBisectResult.new result mbr.create_send_email