Skip to content

github actions 新增工作流 下游仓库定时同步 上游仓库[已测] - #2019

Merged
huiyadanli merged 2 commits into
babalae:mainfrom
Kirito520Asuna:main-sync-upstream
Sep 28, 2025
Merged

huiyadanli merged 2 commits into
babalae:mainfrom
Kirito520Asuna:main-sync-upstream

Conversation

@Kirito520Asuna

Copy link
Copy Markdown
Contributor

No description provided.

@physligl

physligl commented Sep 28, 2025 •

Copy link
Copy Markdown
Member
  1. 因为主仓库采取的是压缩commit的方式merge,会导致下游仓库存在ahead主仓库的情况,这种情况目前是如何处理。
  2. 目前看起来是定时触发,可以考虑改成主仓库有新的commit时就同步。
  3. 能否提供开关让下游仓库选择是否启用这个功能,并且应该默认保持关闭,目前fork的下游仓库数量有点多。
  4. 手动触发时,提供一些选项,比如“同步下游仓库哪个分支”,“是否保留ahead提交”。
  5. 同步提交文档说明。

@Kirito520Asuna

Copy link
Copy Markdown
Contributor Author

那我看看怎么修改

@physligl
physligl requested a review from Copilot September 28, 2025 05:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a GitHub Actions workflow for automatic synchronization with upstream repository, enabling downstream forks to stay up-to-date with the main repository.

  • Configures scheduled synchronization every 12 hours at 8:00 and 16:00 UTC
  • Implements conditional logic to prevent execution on the upstream repository itself
  • Sets up automated pull request creation when conflicts occur during synchronization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread .github/workflows/sync_upstream.yml Outdated
Comment thread .github/workflows/sync_upstream.yml
@huiyadanli

Copy link
Copy Markdown
Member
  • 这个功能不能做成自动的,Action 的使用额会累计至主仓库。这种定时触发方式极易导致 Github 判定 Action 滥用导致主仓库被封禁
  • 如果能自动解决压缩提交后的冲突,我觉的可以做成易用的手动触发形式。相当于给作者一个易用的功能。
  • 如果不能解决自动解决压缩提交后的冲突,我觉的这个 Action 没啥用。
  • 还是期望部分有能力的作者能够学会使用 Git 的

@Kirito520Asuna

Copy link
Copy Markdown
Contributor Author

请查看上述 配置是否满足条件

@huiyadanli
huiyadanli merged commit d5900b8 into babalae:main Sep 28, 2025
@physligl

Copy link
Copy Markdown
Member

同步一下文档会好一些

@Kirito520Asuna

Copy link
Copy Markdown
Contributor Author

直接写README.md?

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.

4 participants