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

fix get_pr_ut error (#44787)

* fix get_pr_ut error

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