add-and-commit icon indicating copy to clipboard operation
add-and-commit copied to clipboard

False reporting of Working tree clean. Nothing to commit.

Open theofficialgman opened this issue 1 year ago • 2 comments

workflow: https://github.com/Botspot/pi-apps/actions/runs/7676529394/workflow

working tree is checked for any changes with git diff HEAD --name-only and the output is

apps/Oh My Posh/install
apps/Pycharm CE/install-64

https://github.com/Botspot/pi-apps/actions/runs/7676529394/job/20924363545#step:5:41 these are files that already exist in the git repo but have been modified.

however running EndBug/add-and-commit@v9 results in a false report that the working tree is clean.

Internal logs
  > Staging files...
  > Adding files...
  > No files to remove.
  > Checking for uncommitted changes in the git working tree...
> Working tree clean. Nothing to commit.
Outputs
  committed: false
  commit_long_sha: undefined
  commit_sha: undefined
  pushed: false
  tagged: false
  tag_pushed: false

https://github.com/Botspot/pi-apps/actions/runs/7676529394/job/20924363545#step:7:36

theofficialgman avatar Jan 27 '24 05:01 theofficialgman

removing the with

          fetch: false
          add: '--refresh'

works around this issue (not ideal since I do not want to add any potential new files to the repo). however now the same issue as mentioned here occurs -> https://github.com/stefanzweifel/git-auto-commit-action/issues/317

theofficialgman avatar Jan 27 '24 05:01 theofficialgman

Hey, thanks for opening this issue! Does this also happen if you use add: '-A'?

EndBug avatar Feb 02 '24 13:02 EndBug

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 22 '24 17:02 github-actions[bot]