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

Do not push with --allow-empty if there are no changes #28

Open
vsoch opened this issue Dec 28, 2019 · 1 comment
Open

Do not push with --allow-empty if there are no changes #28

vsoch opened this issue Dec 28, 2019 · 1 comment

Comments

@vsoch
Copy link
Contributor

vsoch commented Dec 28, 2019

Currently, the workflows will still open a pull request or commit if there are no changes to the graphic. Although this is unlikely for an active repository, we should remove the --allow-empty and catch the error and still return success if it's not opened. There might be a better command to do the check, but first I'm just going to try adding || echo "No changes"

@vsoch
Copy link
Contributor Author

vsoch commented Dec 28, 2019

Testing locally - when there are no changes the exit status is 1

$ git commit -a -s -m 'there are no changes'
echo $?
1

So instead we can do

$ git commit -a -s -m 'there are no changes' || echo "No changes"
echo $?
0

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

No branches or pull requests

1 participant