Skip to content

fix(publish): read the helm chart name from the top-level key only - #1231

Merged
BryanFRD merged 1 commit into
mainfrom
fix/helm-chart-name
Sep 28, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
fix/helm-chart-name

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Closes #1230

read_chart_name trimmed each line before matching name:, so in a Chart.yaml listing dependencies: or maintainers: before the chart's own name:, the nested entry won and the chart was checked and pushed under the dependency's name. Only unindented lines count now. Tests cover the nested case (fails before the fix) and CRLF with single quotes.

@ferrfleet ferrfleet Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping the per-line trim() is the right fix: nested name: entries under dependencies:/maintainers: are always indented, so strip_prefix("name:") on the raw line now only matches a top-level key. str::lines() strips the trailing \r, so the CRLF test exercises what it claims to, and the value-side trim() still handles trailing spaces and quotes. Both new tests fail before the change.

Nit: the scan still misses YAML that helm itself accepts, notably name : my-chart (space before the colon) and a quoted key "name": my-chart, and it would pick up a name: in a second document after ---. serde_norway is already a dependency in the same cli feature set this module lives in (publishers/mod.rs pulls colored), so deserialising into a small struct with a name field would remove the whole class of edge cases rather than adding another string rule each time one turns up. Not worth blocking on: the current form covers every Chart.yaml helm's own helm create emits.

@BryanFRD
BryanFRD merged commit 6a1b084 into main Sep 28, 2026
32 checks passed
@BryanFRD
BryanFRD deleted the fix/helm-chart-name branch September 28, 2026 11:40
ferrflow Bot added a commit that referenced this pull request Sep 28, 2026
## [7.26.11] - 2026-09-28

### Bug Fixes

- fix(publish): read the helm chart name from the top-level key only (#1231)
- fix(migrate): keep semantic-release tags matching after migration (#1229)
- fix(release): refuse to move a floating tag backward on a hotfix (#1226)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(publish): helm publisher can pick a dependency's name as the chart name

1 participant