github_controller.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:triggear 作者: futuresimple 项目源码 文件源码
def set_pr_sync_label_with_retry(self, repo, pr_number):
        retries = 3
        while retries:
            try:
                self.__gh_client.get_repo(repo).get_issue(pr_number).add_to_labels(Labels.pr_sync)
                return
            except github.GithubException as gh_exception:
                logging.exception(f'Exception when trying to set label on PR. Exception: {gh_exception}')
                retries -= 1
                await asyncio.sleep(1)
        raise TriggearTimeoutError(f'Failed to set label on PR #{pr_number} in repo {repo} after 3 retries')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号