"nothing to commit, working tree clean Error: Invalid status code: 1" despite `skip_dirty_check`
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
調査の方向性
.github/workflows/tag-version.yml と tag-version-this-repo.yml ワークフローを使用して問題を再現し、その後、スタックトレースに示されている ChildProcess のステータス処理付近の index.js を調査します。v7.0.0 の動作を v6.0.1 および issue 204 と比較します。空のマージに続いて skip_dirty_check が、無効なステータスコードエラーなしで成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Shell
- スター
- 2.6k
- フォーク
- 284
- 平均マージ
- 1分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
source:reader type:content-error
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
stephrobert/blog-roadmap#136 ·
-
add `git-lfs`オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ophub/amlogic-s9xxx-armbian#3752 ·
メンテナーはふだん 1 日以内に返信
-
prio:low type:chore
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
davidsneighbour/dotfiles#602 ·
メンテナーはふだん 3 日以内に返信