Closed Tylerjet closed 9 months ago
will do the indent, as for optional feature i think it should be more of a required thing as you will want to know if your crons are not running and there is no error message from cron, it just silently fails if there is an issue.
So a user could go days without a backup and never know their crons were not running as they would just assume there were no changes to push.
So this will just ensure with no changes you still get a sort of "Hey I'm still working just fine" commit from the backup script.
but if you don't see it after like a every 4 hours script you know something might be wrong as it should be at least pushing that message every 4 hours.
Fair enough
Please make this feature configurable. Having my backup repo polluted by empty commits is (at least for me) not desirable.
@dwzg Your words shall be heard. You can add empty_commit=no
to your .env
file, read the corresponding documentation for more information.
Awesome, thanks for the quick response!
added a check for if HEAD still matches remote after attempting to commit files, if they match (no new updates) we instead create an empty commit with a message of "$commit_message - No new changes pushed", and push that to the repo.
Had a few instances where i was trying to test backup crons/jobs and keep having to change something in a file just to make sure it was actually pushing all the way to the repo. And feels like a nice little feature that you still see a commit message even if everything is up-to-date so you know jobs are running as expected at quick glance.