From 48bd7d31c65ed43aea18cd1b7f46d1d7e28af200 Mon Sep 17 00:00:00 2001 From: Zhangyifan Date: Tue, 8 Sep 2020 16:50:45 +0800 Subject: [PATCH] =?UTF-8?q?gitee=E6=9F=A5=E8=AF=A2=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E6=9C=89=E5=8F=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=BF=94=E5=9B=9E=E7=A9=BA=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patch-tracking/patch_tracking/task/task_apscheduler.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/patch-tracking/patch_tracking/task/task_apscheduler.py b/patch-tracking/patch_tracking/task/task_apscheduler.py index 69e7265b..41d87187 100644 --- a/patch-tracking/patch_tracking/task/task_apscheduler.py +++ b/patch-tracking/patch_tracking/task/task_apscheduler.py @@ -143,7 +143,6 @@ def create_patch_issue_pr(patch, cur_time): else: logger.error('[Patch Tracking %s] Fail to create branch: %s', cur_time, new_branch) patch_lst = list() - # 表格格式会导致 Gitee 敏感词,先去掉 issue_table = "" for latest_commit in patch['commit_list']: scm_commit_url = '/'.join(['https://github.com', patch['scm_repo'], 'commit', latest_commit['commit_id']]) @@ -222,12 +221,9 @@ def upload_spec_to_repo(patch, patch_lst, cur_time): new_spec = modify_spec(log_title, log_content, patch_file_lst, spec_content) update_spec_to_repo(patch['repo'], new_branch, cur_time, new_spec, spec_sha) else: - if 'message' in ret and 'File Not Found' in ret['message']: - spec_content = '' - new_spec = modify_spec(log_title, log_content, patch_file_lst, spec_content) - create_spec_to_repo(patch['repo'], new_branch, cur_time, new_spec) - else: - logger.error('[Patch Tracking %s] Fail to update spec: %s. Result: %s', cur_time, spec_file, ret) + spec_content = '' + new_spec = modify_spec(log_title, log_content, patch_file_lst, spec_content) + create_spec_to_repo(patch['repo'], new_branch, cur_time, new_spec) def modify_spec(log_title, log_content, patch_file_lst, spec_content): -- Gitee