--migrate-local-actions rewrites action files in nested worktrees and submodules
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 20/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
--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.
- 主要言語
- Go
- スター
- 253
- フォーク
- 15
- 平均マージ
- 19時間 30分
- マージ済み PR(30日)
- 60
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/gh-actions-lock のほかの issue
-
Fix mode unpins a reusable workflow call when the same repository is also used as a step actionオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/gh-actions-lock#261 ·
メンテナーはふだん 1 日以内に返信
-
Dependabot drops an unchanged transitive dependency when bumping a composite action対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
github/gh-actions-lock#257 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
github/gh-actions-lock#252 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
github/gh-actions-lock#247 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
github/gh-actions-lock#246 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
github/gh-actions-lock の issue をすべて見る
似ている issue
-
area: frontend priority: normal
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
TestAutonomousStop_ReportsObservedState fails under host load: 1s wall-clock ceiling vs 250ms cycleオープンtype:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
nightgauge/nightgauge#2909 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
jasonfen/terminal-space-program#842 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MustacheCase/zanadir#521 ·
メンテナーはふだん 1 日以内に返信
-
v3.1.0: spread placement groups fail — label key uses the reserved hetzner.cloud prefix対応中かも @ScrimReaper が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
stubbi/karpenter-provider-hetzner#120 ·
メンテナーはふだん 4 日以内に返信