ci(molecule): select by image pin for a molecule.yml change of only pins or comments #439

Merged
Defame1297 merged 2 commits from ci/selector-narrow-pins into main 2026-11-27 16:08:47 +00:00
2 Commits
Author SHA1 Message Date
Defame1297 7df98ea8c7 Merge branch 'main' into ci/selector-narrow-pins
Build / build (pull_request) Successful in 28s
Molecule / molecule (pull_request) Successful in 5s
Lint / lint (pull_request) Successful in 1m33s
2026-11-27 16:07:04 +00:00
Defame1297 6eca2f4031 ci(molecule): select by image pin for a molecule.yml change of only pins or comments
Build / build (pull_request) Successful in 29s
Lint / lint (pull_request) Successful in 1m59s
Molecule / molecule (pull_request) Successful in 1m37s
A change to .gitea/workflows/molecule.yml selected every scenario, so a
molecule image pin bump or a comment edit ran the full set. The selector
now compares the merge-base and HEAD copies of the workflow:

- `#` and blank lines outside a block scalar are dropped; inside one
  (a `run: |` script, where they may be heredoc content) they count;
- the line after each CI_IMAGE, MOLECULE_IMAGE and MOLECULE_IMAGE_2604
  `>-` key must be its value, deeper than the key and in the shape
  Renovate writes, in both copies;
- comments only select nothing; a MOLECULE_IMAGE* pin selects every
  scenario with a file naming it, or every scenario when a shared
  molecule file names it or a file is unreadable or a symlink;
- CI_IMAGE, any other difference or a git error selects everything.

reason_for() is split out of select() to stay under ruff's complexity
limit. The Molecule rule in .gitea/workflows/AGENTS.md describes the
new case.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-27 14:36:24 +00:00