The sync action keeps failing in cases where there are no new updates even though #34 should have fixed that. I took a closer look at it today and e.g. in 3635205337 it seems that the problem is caused by the .github-workflow/ dir:
Untracked files:
(use "git add <file>..." to include in what will be committed)
.github-workflow/
This is the directory where the action keeps a clone of the bot repo. Looks like the issue is that the translation repo gets cloned into the default working directory and the bot repo ends up as a subdirectory in it. Git sees it as an untracked file and the check for clean state fails.
This PR fixes that by putting both repos in separate directories.
This, however, uncovered another problem where the script did not account for the situation where there are zero changes upstream (it ended up amending last commit on develop in that situation because there is no merge commit created). The PR adjusts the logic to commit explicitly only when necessary (i.e. when there are merge conflicts).
Run 3699078162 correctly detected that sync branch exists and did not create another sync PR.
I merged the sync PR. The PR had no conflicts to resolve because there are no docs changes in this template repo. This brought the repo up to date with Solidity develop.
Run 3699085021 detected no upstream changes and correctly did not create another PR.
The sync action keeps failing in cases where there are no new updates even though #34 should have fixed that. I took a closer look at it today and e.g. in 3635205337 it seems that the problem is caused by the
.github-workflow/
dir:This is the directory where the action keeps a clone of the bot repo. Looks like the issue is that the translation repo gets cloned into the default working directory and the bot repo ends up as a subdirectory in it. Git sees it as an untracked file and the check for clean state fails.
This PR fixes that by putting both repos in separate directories.
This, however, uncovered another problem where the script did not account for the situation where there are zero changes upstream (it ended up amending last commit on
develop
in that situation because there is no merge commit created). The PR adjusts the logic to commit explicitly only when necessary (i.e. when there are merge conflicts).I tested this in the German repo:
develop
.I hope this solves issue with the failing action.