未验证 提交 d985b4b1 编写于 作者: Y YUNSHEN XIE 提交者: GitHub

fix get_pr_ut error (#44787)

* fix get_pr_ut error

* fix bug
上级 4c3e13de
...@@ -60,12 +60,15 @@ class PRChecker(object): ...@@ -60,12 +60,15 @@ class PRChecker(object):
last_commit = None last_commit = None
ix = 0 ix = 0
while True: while True:
commits = self.pr.get_commits().get_page(ix) try:
for c in commits: commits = self.pr.get_commits().get_page(ix)
last_commit = c.commit if len(commits) == 0:
else: raise ValueError("no commit found in {} page".format(ix))
last_commit = commits[-1].commit
except Exception as e:
break break
ix = ix + 1 else:
ix = ix + 1
if last_commit.message.find('test=allcase') != -1: if last_commit.message.find('test=allcase') != -1:
print('PREC test=allcase is set') print('PREC test=allcase is set')
self.full_case = True self.full_case = True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册