mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-21 20:31:48 +02:00
In case the target branch already exists, `checkout_branch()` needs to simply `exit 0`, so the subsequent steps could be skipped. In that case, it has to set `UPDATE_NEEDED` to 0, so the Github action could avoiding creating another PR. It resolves occasional issues that happen when subsequent PRs overwrite existing open PRs made on the very same version. It would be no problem if there was no change in the PR. However, if there was any manual change in the previous open PR, the change will be simply overwritten. That would be very unfortunate.