提交 48bd7d31 编写于 作者: Z Zhangyifan 提交者: chenyanpan

gitee查询文件接口返回有变化,查询不存在的文件返回空数组

上级 0badc26d
......@@ -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):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册