"nothing to commit, working tree clean Error: Invalid status code: 1" despite `skip_dirty_check`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Tái hiện vấn đề bằng cách sử dụng .github/workflows/tag-version.yml và workflow tag-version-this-repo.yml, sau đó kiểm tra index.js xung quanh phần xử lý trạng thái ChildProcess được hiển thị trong stack trace. So sánh hành vi của v7.0.0 với v6.0.1 và issue 204; hoàn tất khi một merge rỗng, tiếp theo là skip_dirty_check, thực hiện thành công mà không có lỗi mã trạng thái không hợp lệ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Shell
- Star
- 2.6k
- Fork
- 284
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của stefanzweifel/git-auto-commit-action
-
`repository` input doesn't workĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Tất cả issue của stefanzweifel/git-auto-commit-action
Issue tương tự
-
Negative subscript on a sparse array counts from the number of elements, not from the highest indexĐang mởarea: compat bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
reubeno/brush#1570 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
platform-mesh/helm-charts#2569 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
kunchenguid/firstmate#7604 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
product-to-storybook is skipped silently by npx skills add because its frontmatter is invalid YAMLĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày