Signed-off-by: Liu Shaofei 370072077@qq.com --- sbin/auto_submit | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sbin/auto_submit b/sbin/auto_submit index 51ecc6a..02140d7 100755 --- a/sbin/auto_submit +++ b/sbin/auto_submit @@ -31,7 +31,10 @@ class AutoSubmit def submit(newrefs_info, submit_argv) newrefs_info['new_refs']['heads'].each do |branch, commit_id| real_argvs = Array.new(submit_argv) - real_argvs.push("upstream_branch=#{branch.delete_prefix('refs/heads/')}") + branch_master = branch.delete_prefix('refs/heads/') + next unless branch_master == 'master' + + real_argvs.push("upstream_branch=#{branch_master}") real_argvs.push("upstream_commit=#{commit_id}") tag = %x(git -C /srv/git/#{newrefs_info['git_repo']}.git tag --points-at #{commit_id}) real_argvs.push("upstream_tag=#{tag}") unless tag.empty?