Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望添加清理缓存的功能 #166

Closed
wlccgp3 opened this issue Nov 6, 2022 · 4 comments
Closed

希望添加清理缓存的功能 #166

wlccgp3 opened this issue Nov 6, 2022 · 4 comments

Comments

@wlccgp3
Copy link

wlccgp3 commented Nov 6, 2022

由于同步org仓库列表很大,自建的runner磁盘满了
fork的改动很大,就不提交合并请求了,这里只截取部分代码
yml

force_clean: true

mirror.py

    def clean(self):
        if self.force_clean:
            print("Force Clean...")
            shutil.rmtree(self.repo_path, True)
@wlccgp3
Copy link
Author

wlccgp3 commented Nov 6, 2022

日志打印问题,默认缓存是绝对路径,repo_path已经是绝对路径了,显示成了/github/workspace/github/workspace/hub-mirror-cache

        print("Clone completed: %s" % os.getcwd() + self.repo_path)

个人建议,可以用CUR_DIR = Path(__file__).resolve().parent来解析

@Yikun
Copy link
Owner

Yikun commented Nov 7, 2022

@wlccgp3 可以提个PR。就是同步完,把本地路径清理了,对吧?

@wlccgp3
Copy link
Author

wlccgp3 commented Nov 7, 2022

我这边魔改了很多东西,就是同步完,清理仓库,PR能不能只提交特定目录的更改?我这边的commit太多无用的东西了

@Yikun
Copy link
Owner

Yikun commented Nov 7, 2022

git checkout -b xxx

创建一个新的分支即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants