copy_file_to_another_repo_action icon indicating copy to clipboard operation
copy_file_to_another_repo_action copied to clipboard

Add retry with pull just before pushing to avoid errors

Open omerd-cyera opened this issue 1 year ago • 0 comments

Hi, First of all, thanks for the great extension, Its really helpful.

I'm running into issues when using this action to push into the main branch of another repo. The other repo has a pretty high commit rate, so every once in while i get a:

error: failed to push some refs to 'github.com:____.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details

I think adding a git pull right before the commit, or after with some merge or rebase flag could be very useful. We could add a retry count option, and maybe another option for custom git pull flags.

I have the time and willing to open a PR. Is this something agree with and want to add?

omerd-cyera avatar Nov 28 '23 13:11 omerd-cyera