--migrate-local-actions rewrites action files in nested worktrees and submodules
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 20/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
--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.
- Lenguaje dominante
- Go
- Estrellas
- 253
- Forks
- 15
- Merge medio
- 19 h 30 min
- PR fusionados (30 d)
- 60
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/gh-actions-lock
-
Fix mode unpins a reusable workflow call when the same repository is also used as a step actionAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
github/gh-actions-lock#261 ·
Los mantenedores suelen responder en 1 día
-
Dependabot drops an unchanged transitive dependency when bumping a composite actionPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
github/gh-actions-lock#257 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
github/gh-actions-lock#252 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
github/gh-actions-lock#247 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
github/gh-actions-lock#246 · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de github/gh-actions-lock
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
rishikanthc/Scriberr#506 ·
-
[Bug] rollingUpdatePartition panics when live StatefulSet replicas sit far below the desired countAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
sgl-project/rbg#547 ·
Los mantenedores suelen responder en 1 día
-
area: frontend priority: normal
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area/validator
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
TestAutonomousStop_ReportsObservedState fails under host load: 1s wall-clock ceiling vs 250ms cycleAbiertotype:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nightgauge/nightgauge#2909 ·
Los mantenedores suelen responder en 1 día