Skip to content

Exclude GitHub pull requests and service refs in mirror command - #27

Closed
mcxinyu wants to merge 1 commit into
wearerequired:masterfrom
mcxinyu:master
Closed

Exclude GitHub pull requests and service refs in mirror command#27
mcxinyu wants to merge 1 commit into
wearerequired:masterfrom
mcxinyu:master

Conversation

@mcxinyu

@mcxinyu mcxinyu commented Jul 20, 2026

Copy link
Copy Markdown

zh_CN

  • 修改命令以排除 GitHub 拉取请求和服务创建的引用
  • 更新了 git for-each-ref 命令以同时处理 refs/pull 和 refs/github-services
  • 修复了镜像过程中可能存在的引用清理问题

en_US

  • Modified the command to exclude references created by GitHub pull requests and services
  • Updated the git for-each-ref command to handle both refs/pull and refs/github-services simultaneously
  • Fixed potential reference cleanup issues during mirroring

- 修改命令以排除 GitHub 拉取请求和服务创建的引用
- 更新了 git for-each-ref 命令以同时处理 refs/pull 和 refs/github-services
- 修复了镜像过程中可能存在的引用清理问题
@ocean90

ocean90 commented Jul 20, 2026

Copy link
Copy Markdown
Member

Thank you for the PR! Can you let me know what a "github-services" ref is?

@mcxinyu

mcxinyu commented Jul 20, 2026

Copy link
Copy Markdown
Author

I couldn't find any relevant documentation, but this issue consistently occurs when I run this Action plugin in my project.

I suspect there might be some problems within the GitHub Actions environment.

Could you consider merging the code, or I can create an issue so other developers encountering this problem can use my branch as a workaround.

image

@ocean90

ocean90 commented Jul 20, 2026

Copy link
Copy Markdown
Member

@mcxinyu Thanks, I couldn't find it either. Any chance you could give #28 a try? That should fix any ref that GitHub may introduce in the future.

uses: wearerequired/git-mirror-action@fix/mirror-only-branches-and-tags

@mcxinyu

mcxinyu commented Jul 20, 2026

Copy link
Copy Markdown
Author

@mcxinyu Thanks, I couldn't find it either. Any chance you could give #28 a try? That should fix any ref that GitHub may introduce in the future.

uses: wearerequired/git-mirror-action@fix/mirror-only-branches-and-tags

I have used this branch and the execution succeeded.

image

@mcxinyu

mcxinyu commented Jul 20, 2026

Copy link
Copy Markdown
Author

Thank you for your help.

@ocean90

ocean90 commented Jul 20, 2026

Copy link
Copy Markdown
Member

Thanks a lot for reporting this and for digging into it, @mcxinyu. And especially for verifying #28 on your side! 🙏

Closing this in favor of #28.

@ocean90 ocean90 closed this Jul 20, 2026
@mcxinyu

mcxinyu commented Jul 21, 2026

Copy link
Copy Markdown
Author

Unfortunately, I didn't notice yesterday that my repository branch name contained a slash (/), and version 1.3.0 does not support pushing branches whose names include slashes.

The problem I encountered yesterday might be caused by the slash "/" contained in the branch name.

Please consider this scenario. @ocean90

I am temporarily using the branch I created yesterday to resolve this issue.

image

@ocean90

ocean90 commented Jul 21, 2026

Copy link
Copy Markdown
Member

@mcxinyu #30 should fix this.

@mcxinyu

mcxinyu commented Jul 21, 2026

Copy link
Copy Markdown
Author

@mcxinyu #30 should fix this.

Yes, it worked as I expected.

Thanks.

image

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

Successfully merging this pull request may close these issues.

2 participants