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

无法删除分支时保证同步完成后抛出错误 #39

Closed
yi-Xu-0100 opened this issue Sep 10, 2020 · 4 comments
Closed

无法删除分支时保证同步完成后抛出错误 #39

yi-Xu-0100 opened this issue Sep 10, 2020 · 4 comments

Comments

@yi-Xu-0100
Copy link
Contributor

我 在github 上更换了主分支,并删除了主分支,由于原先有同步问题,此时造成 action 无法删除 gitee 的主分支的问题,需要手动到 gitee 上切换默认分支,并手动删除,不知道能否能够实现自动化,还是说,这个切换默认分支的问题,只能通过网页端确认。

@Yikun
Copy link
Owner

Yikun commented Sep 11, 2020

你这个场景不知道使用force参数是否会update掉?

这个默认分支的切换目前不支持,这个用户场景也确实不太频繁,动手删下吧,LOL。

@yi-Xu-0100
Copy link
Contributor Author

@Yikun 我默认设置是 force 参数的。

那是否可以对该情况进行判断,并在脚本最后抛出错误,这样不会中断可能的同步。我的这个仓库,好像同步了我新生成的分支,只是没有办法删除默认分支,报错退出了(这个顺序非常棒,但我不知道是否一定如此)。我不确定当前的逻辑是否会默认先复制分支,保证仓库同步状况。

我想如果没法删除默认分支,那对其他仓库其他分支希望能够同步而不会中断。

这样能够保证同步状况。而且我如果发现出现这个问题的时候,只需要去 gitee 中切换默认分支,并删除原默认分支。我担心会出现我想切换分支,而造成新建的分支未同步过去,而不知道怎么办。

@yi-Xu-0100 yi-Xu-0100 changed the title 无法删除默认分支 无法默认分支时保证同步完成后抛出错误 Sep 11, 2020
@yi-Xu-0100 yi-Xu-0100 changed the title 无法默认分支时保证同步完成后抛出错误 无法删除分支时保证同步完成后抛出错误 Sep 11, 2020
@Yikun
Copy link
Owner

Yikun commented Sep 11, 2020

那是否可以对该情况进行判断,并在脚本最后抛出错误,这样不会中断可能的同步。
我想如果没法删除默认分支,那对其他仓库和其他分支希望能够同步而不会中断。

这是一个不错的idea, 其实在这个PR #36 之前(v0.08及以前版本),是会continue的。在这里加了直接退出的逻辑。

我提个issue跟踪哈~#41

我的这个仓库,好像同步了我新生成的分支,只是没有办法删除默认分支,报错退出了(这个顺序非常棒,但我不知道是否一定如此)。我不确定当前的逻辑是否会默认先复制分支,保证仓库同步状况。

没有那么复杂的逻辑,: ),只是利用了git push的基本功能,entrypoint.sh#L117-L126,会同步所有现存的分支。

@yi-Xu-0100
Copy link
Contributor Author

ok,那先关闭这个 issue 了~

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