Skip to content

fix: use 2-space indentation in generated score.yaml#41

Merged
mathieu-benoit merged 3 commits intomainfrom
copilot/create-pr-using-strategy-from-score-compose
Apr 12, 2026
Merged

fix: use 2-space indentation in generated score.yaml#41
mathieu-benoit merged 3 commits intomainfrom
copilot/create-pr-using-strategy-from-score-compose

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

Analogous to score-spec/score-compose#461, this fixes the sample score.yaml generated by score-helm init to use 2-space indentation instead of the 4-space default from yaml.Marshal.

Description

The init command was calling yaml.Marshal(workload) directly, which uses gopkg.in/yaml.v3's default 4-space indentation. The state.go already used enc.SetIndent(2) for state.yaml.

Fix: Replace yaml.Marshal with a yaml.NewEncoder that sets enc.SetIndent(2).

Also fixes a tab character (instead of spaces) in the template source code (template.go line 31), which was a formatting inconsistency (it did not affect generated output due to Go template whitespace trimming).

What does this PR do?

Fixes 4-space indentation in score.yaml output from score-helm init, aligning it with standard YAML formatting and the existing state.yaml output.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New chore (expected functionality to be implemented)

Checklist:

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I've signed off with an email address that matches the commit author.

Copilot AI and others added 2 commits April 11, 2026 16:09
…emplate

Agent-Logs-Url: https://github.com/score-spec/score-helm/sessions/c15dd739-beb7-4a65-a4df-f8de898398bc

Co-authored-by: mathieu-benoit <11720844+mathieu-benoit@users.noreply.github.com>
Agent-Logs-Url: https://github.com/score-spec/score-helm/sessions/c15dd739-beb7-4a65-a4df-f8de898398bc

Co-authored-by: mathieu-benoit <11720844+mathieu-benoit@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

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

LGTM

@mathieu-benoit mathieu-benoit marked this pull request as ready for review April 11, 2026 18:50
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2026

Overview

Image reference score-helm:latest score-helm:latest
- digest 1d119a0c6afe 6fab90e1d8e3
- tag latest latest
- provenance 69430ca 80f0d91
- vulnerabilities critical: 0 high: 0 medium: 0 low: 0 critical: 0 high: 0 medium: 0 low: 0
- platform linux/amd64 linux/amd64
- size 3.7 MB 3.7 MB (+312 B)
- packages 23 23
Policies (0 improved, 0 worsened)
Policy Name score-helm:latest score-helm:latest Change Standing
Default non-root user No Change
No AGPL v3 licenses No Change
No fixable critical or high vulnerabilities No Change
No high-profile vulnerabilities No Change
No outdated base images No Change
No unapproved base images No Change
Supply chain attestations No Change
Valid Docker Hardened Image (DHI) or DHI base image ⚠️ 2 ⚠️ 2 No Change
Packages and Vulnerabilities (1 package changes and 0 vulnerability changes)
  • ♾️ 1 packages changed
  • 22 packages unchanged
Changes for packages of type golang (1 changes)
Package Version
score-helm:latest
Version
score-helm:latest
♾️ github.com/score-spec/score-helm 0.0.0-20260411161043-69430caecf27 0.10.2-0.20260412225718-80f0d91fa8f9

Copy link
Copy Markdown
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

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

LGTM

@mathieu-benoit mathieu-benoit merged commit 101ac57 into main Apr 12, 2026
11 checks passed
@mathieu-benoit mathieu-benoit deleted the copilot/create-pr-using-strategy-from-score-compose branch April 12, 2026 23:07
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.

2 participants