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

Is this possible to include git pull --rebase before push? #13

Closed
bdovh opened this issue Oct 25, 2022 · 3 comments · Fixed by #23
Closed

Is this possible to include git pull --rebase before push? #13

bdovh opened this issue Oct 25, 2022 · 3 comments · Fixed by #23

Comments

@bdovh
Copy link

bdovh commented Oct 25, 2022

We have often several CI jobs invoked simultaneously, and the first one executes succesfully while the second one fails

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.
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/actions-js/push/master/start.js:9:19)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:[16](https://github.com/LinkSquares/salesforce-finalize/actions/runs/3319940082/jobs/5485720915#step:9:17))
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) {
  code: 1
}
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/actions-js/push/master/start.js:9:[19](https://github.com/LinkSquares/salesforce-finalize/actions/runs/3319940082/jobs/5485720915#step:9:20))
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:[30](https://github.com/LinkSquares/salesforce-finalize/actions/runs/3319940082/jobs/5485720915#step:9:31)1:5)

If we could just perform git pull --rebase or any pull, it would partially solve this problem unless there are conflicts.
At least for the case when there are no conflicts, I would prefer my CI not to fail. I can fork this repo and create a PR with a fix

@devenes
Copy link
Contributor

devenes commented Oct 25, 2022

I am agreed, it can be fixed.

@bdovh
Copy link
Author

bdovh commented Oct 25, 2022

@devenes My implementation is quite naive https://github.com/actions-js/push/pull/14/files - you may decide if you would like to hide it under configuration parameter or something like that

@devenes
Copy link
Contributor

devenes commented Jan 9, 2023

Thanks for working on this issue @bdovh. I am sure it will be very useful. I'm so excited to use this feature! We can define an option for use.

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 a pull request may close this issue.

2 participants