github_controller.py 文件源码

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

项目:triggear 作者: futuresimple 项目源码 文件源码
def are_files_in_repo(self, files: List[str], hook: HookDetails) -> bool:
        try:
            for file in files:
                self.__gh_client.get_repo(hook.repository).get_file_contents(path=file, ref=hook.sha if hook.sha else hook.branch)
        except github.GithubException as gh_exc:
            logging.exception(f"Exception when looking for file {file} in repo {hook.repository} at ref {hook.sha}/{hook.branch} (Exc: {gh_exc})")
            return False
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号