Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

"nothing to commit, working tree clean Error: Invalid status code: 1" despite `skip_dirty_check`

Aperta
#396 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
git, github-actions, shell
Ambito
ci-cd, devops

Direzione di ricerca

Riproduci il problema usando .github/workflows/tag-version.yml e il workflow tag-version-this-repo.yml, quindi esamina index.js nella parte relativa alla gestione dello stato di ChildProcess mostrata nello stack trace. Confronta il comportamento di v7.0.0 con v6.0.1 e issue 204; il lavoro è completato quando un merge vuoto seguito da skip_dirty_check riesce senza l’errore relativo al codice di stato non valido.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
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
  1. In your workflow, run git merge --strategy=ours --no-commit some-other-branch. This merges some-other-branch but leaving no changed files.
  2. Run the action with the below code.
  3. 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

https://github.com/Lombiq/GitHub-Actions

Lingua principale
Shell
Stelle
2.6k
Fork
284
Merge medio
1m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.