20 Star 15 Fork 205

Fengguang/compass-ci

forked from openEuler/compass-ci 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
git-bisect 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
caoxueliang 提交于 2020-12-12 14:32 +08:00 . delimiter: rename job_id to bad_job_id
#!/usr/bin/env ruby
# SPDX-License-Identifier: MulanPSL-2.0+
# frozen_string_literal: true
require_relative '../container/defconfig.rb'
set_local_env
require 'optparse'
require_relative '../lib/git_bisect'
require_relative '../lib/mail_bisect_result'
def parse_argv
items = {}
ARGV.each do |item|
key, value = item.split('=', 2)
if key && value
items[key] = value
end
end
items
end
op = OptionParser.new do |opts|
opts.banner = 'Usage: git-bisect bad_job_id=$bad_job_id, error_id=$error_id'
opts.separator ''
opts.separator 'bad_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.on_tail('-h', '--help', 'show the help message') do
puts opts
exit
end
end
op.parse!(ARGV)
items = parse_argv
unless items['bad_job_id'] || items['error_id']
system 'git-bisect -h'
exit
end
gb = GitBisect.new(items)
result = gb.find_first_bad_commit
mbr = MailBisectResult.new result
mbr.create_send_email
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wu_fengguang/compass-ci.git
git@gitee.com:wu_fengguang/compass-ci.git
wu_fengguang
compass-ci
compass-ci
master

搜索帮助