BetaHuhn / repo-file-sync-action

πŸ”„ GitHub Action to keep files like Action workflows or entire directories in sync between multiple repositories.
https://github.com/marketplace/actions/repo-file-sync-action
MIT License
290 stars 84 forks source link

Syncing through forked repo hits "shallow update not allowed" after the first pull request is merged into target repo #270

Open GangWang01 opened 1 year ago

GangWang01 commented 1 year ago

🐞 Describe the bug

I synced with FORK parameter referring to Fork and pull request workflow. The action could successfully create the first pull request targeting to the target repo through forked repo. Once the first pull request is merged, when I push some change to the sync file next time in source repo the action run failed due to shallow update not allowed error, like https://github.com/GangWang01/Experiment/actions/runs/3443890910. The error is a result of main branch of forked repo is some commits behind target repo. To work around this problem, I have to manually sync forked repo from its upstream(the target repo). However it doesn't make sense for the purpose of this action.

BTW, ORIGINAL_MESSAGE and COMMIT_AS_PR_TITLE don't work when syncing file through forked repo.

πŸ“š To reproduce

  1. https://github.com/GangWang01/Experiment is the source repo and it's configured to use this action with FORK parameter. This is my own repo I have write access.
  2. https://github.com/JaynieBai/ManageTestResults is the target repo. I don't have write access to it.
  3. Merge the first pull request created by the action.
  4. Push some change to the file that needs to sync to source repo. Then check if the run fails with the error.

πŸ’‘ Expected behavior

It's very helpful syncing through forked repo could work well.

πŸ–ΌοΈ Screenshots

No response

βš™οΈ Environment

Neither BetaHuhn/repo-file-sync-action@v1 nor BetaHuhn/repo-file-sync-action@latest works.

πŸ“‹ Additional context

No response