--migrate-local-actions rewrites action files in nested worktrees and submodules
Maintainer thường phản hồi trong vòng 1 ngà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
- 20/100
Hướng nghiên cứu
The --migrate-local-actions sweep walks every action.yml / action.yaml under the repo and only stops at directories named .git. Pull request #254 and the dont-worktrees-or-submodules branch already cover this, so read that work before starting anything new. Done means the sweep skips any subdirectory below the root that has a .git file or directory, and a ./ ref inside such a checkout is left unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
--migrate-local-actions sweeps the whole repository for action.yml / action.yaml files and rewrites their ./… steps to $/…. The sweep only stops at directories named .git, so it also walks into separate checkouts nested inside the repo:
- git worktrees kept under the repo (e.g.
.gwt/<name>/), which have a.gitfile - submodules, which also have a
.gitfile - nested clones, which have their own
.gitdirectory
Why this is a problem
It edits files that aren't part of the change. A nested worktree is usually another branch someone is working on. After a run in the main checkout, that worktree has uncommitted rewrites the user never asked for, and these files are included in the run's migration count. For a submodule or nested clone, the files belong to a different repository entirely, so the edits can't be committed as part of this repo's change.
An unrelated checkout can stop the run. Migration is all-or-nothing. If any action file in a nested checkout fails migration validation, the whole run fails with refusing to migrate … and rolls back, even though nothing in this repository is wrong.
./ refs into a submodule get the wrong rewrite. A ./path ref is rewritten to $/path when an action file exists at that path on disk. If the path is inside a submodule, the file is on disk but isn't part of this repository's tree, so the $/path ref can't reach it. The ./ ref should be left alone.
Repro
cd my-repo # has .github/workflows/*.yml
git worktree add .gwt/other some-branch
# .gwt/other/.github/actions/foo/action.yml has `uses: ./something`
gh actions-lock --migrate-local-actions
git -C .gwt/other status # foo/action.yml now modified: ./something -> $/something
Expected
The sweep covers only this repository's checkout. It skips any subdirectory below the root that is its own checkout (has a .git file or directory), and it never treats a ./ path inside such a checkout as a same-repo action.
A fix is in progress on the dont-worktrees-or-submodules branch; a PR will follow.
- Ngôn ngữ chính
- Go
- Star
- 253
- Fork
- 15
- Merge trung bình
- 19 giờ 30 phút
- Pull request đã merge (30 ngày)
- 60
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 github/gh-actions-lock
-
Fix mode unpins a reusable workflow call when the same repository is also used as a step actionĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/gh-actions-lock#261 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dependabot drops an unchanged transitive dependency when bumping a composite actionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
github/gh-actions-lock#257 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
github/gh-actions-lock#252 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
github/gh-actions-lock#247 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
github/gh-actions-lock#246 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của github/gh-actions-lock
Issue tương tự
-
agent-butler-finding chore
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
jordansmall/spindrift#6318 ·
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 72/100
Eyevinn/moqlivemock#166 ·
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 72/100
JakeChampion/lang#14091 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
batcher: BAF send context leaks per batchCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
hyperledger/fabric-x-orderer#1409 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
get actions doesn't show the approval flag, and describe action shows it unformattedCó thể đã có người làm @kenokech đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày