"nothing to commit, working tree clean Error: Invalid status code: 1" despite `skip_dirty_check`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Reproduce the issue using .github/workflows/tag-version.yml and the tag-version-this-repo.yml workflow, then inspect index.js around the ChildProcess status handling shown in the stack trace. Compare the v7.0.0 behavior with v6.0.1 and issue 204; done means an empty merge followed by skip_dirty_check succeeds without the invalid status code error.
Written by the indexing model from the issue text.
Description
git-auto-commit Version
v7.0.0
Machine Type
Ubuntu (eg. ubuntu-latest)
Bug description
Despite skip_dirty_check: true, with v7.0.0 pushing an empty commit causes the following error:
nothing to commit, working tree clean
Error: Invalid status code: 1
at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/28e16e81777b558cc906c8750092100bbb34c5e3/index.js:17:19)
at ChildProcess.emit (node:events:508:28)
at maybeClose (node:internal/child_process:1101:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 1
}
Error: Invalid status code: 1
at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/28e16e81777b558cc906c8750092100bbb34c5e3/index.js:17:19)
at ChildProcess.emit (node:events:508:28)
at maybeClose (node:internal/child_process:1101:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
This is a regression with v7.0.0. With v6.0.1 this used to work. Here's a succeeding run with v6: https://github.com/Lombiq/GitHub-Actions/actions/runs/17049708039. And here's a failing one with v7: https://github.com/Lombiq/GitHub-Actions/actions/runs/18795730636/job/53635182329.
https://github.com/stefanzweifel/git-auto-commit-action/issues/204 might be related.
Steps to reproduce
- In your workflow, run
git merge --strategy=ours --no-commit some-other-branch. This mergessome-other-branchbut leaving no changed files. - Run the action with the below code.
- Observe the error mentioned above.
- uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
with:
skip_dirty_check: true
Tried solutions
Since this is an infrequently run workflow, I just merged manually. Pushing directly with git would be an alternative.
Example Workflow
The whole workflow is here: https://github.com/Lombiq/GitHub-Actions/blob/342f3f003b75f8915c8c8311f67426971e798a52/.github/workflows/tag-version.yml (run from https://github.com/Lombiq/GitHub-Actions/blob/342f3f003b75f8915c8c8311f67426971e798a52/.github/workflows/tag-version-this-repo.yml).
Relevant log output
See above.
Repository
- Dominant language
- Shell
- Stars
- 2.6k
- Forks
- 284
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stefanzweifel/git-auto-commit-action
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
All issues in stefanzweifel/git-auto-commit-action
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
kunchenguid/firstmate#7604 ·
Maintainers usually reply within 1 day
-
product-to-storybook is skipped silently by npx skills add because its frontmatter is invalid YAMLOpen
Difficulty 1/5 Under an hour Newbie friendliness 83/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
bug github_actions security
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
DewaldOosthuizen/tech-cheat-sheets-and-notes#388 ·
Maintainers usually reply within 1 day
-
Link Checker ReportOpenautomated issue report
Difficulty 1/5 Under an hour Newbie friendliness 72/100
a2aproject/A2A#2376 ·
Maintainers usually reply within 3 days