From bff554e3e361e22501e87fde26a97ffc3bd3cece Mon Sep 17 00:00:00 2001 From: Shobhit Agarwal Date: Sun, 15 Dec 2024 23:56:57 +0530 Subject: [PATCH] Add check for empty commits --- .github/workflows/todo-to-issue.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/todo-to-issue.yml b/.github/workflows/todo-to-issue.yml index 53ec6c4b35..c61a687593 100644 --- a/.github/workflows/todo-to-issue.yml +++ b/.github/workflows/todo-to-issue.yml @@ -38,6 +38,10 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" - name: Commit and Push Changes run: | - git add . - git commit -m "Automatically added GitHub issue links to TODOs" - git push origin main \ No newline at end of file + git add -A + if [[ `git status --porcelain` ]]; then + git commit -m "Automatically added GitHub issue links to TODOs" + git push origin main + else + echo "No changes to commit" + fi \ No newline at end of file