Skip to content

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

Open

Description

@vsoch

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"

Activity

  1. vsoch commented on Dec 28, 2019

    @vsoch
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions