GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(autodiscovery/githubaction): use goyaml engine to preserve folded scalars by loispostula · Pull Request #11006 · updatecli/updatecli

Conversation

@loispostula

@loispostula loispostula commented Oct 23, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #8295

The yamlpath engine re-encodes files with yaml.v3, whose folded scalar emitter adds a blank line to >- blocks on every run. goyaml now supports comment, so the templates no longer need yamlpath.

Test

go test ./pkg/plugins/resources/yaml/ ./pkg/plugins/autodiscovery/githubaction/

Summary by CodeRabbit

  • Bug Fixes
    • Improved YAML workflow updates: changing a value now preserves the formatting and expression content of adjacent folded values, along with relevant comments.
    • Updated release, tag, and branch workflow handling for GitHub and Gitea.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@loispostula
fix(autodiscovery/githubaction): use goyaml engine to preserve folded…
93e39b5
… scalars

The yamlpath engine re-encodes the whole file with go.yaml.in/yaml/v3,
whose folded scalar emitter inserts an extra line break before
more-indented lines. Every run added a blank line to `>-` blocks such as
multi-line `${{ }}` expressions, even when only a sibling `uses:` key
was updated.

yamlpath was only required for `comment` support, which the goyaml
engine now provides. The docker template already relies on the default
engine with the same key format.

Fixes updatecli#8295

Signed-off-by: Loïs Postula <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ce1a301a-769e-40ba-a576-4c0a9c3eb794
Commits

Reviewing files that changed from the base of the PR and between 1173a93 and fe74921.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8fd2792c-6de0-4fee-9330-3e211998399c
📥 Commits

Reviewing files that changed from the base of the PR and between 5b55822 and 93e39b5.

📒 Files selected for processing: 4
  • pkg/plugins/autodiscovery/githubaction/main_test.go
  • pkg/plugins/autodiscovery/githubaction/templateGHAGitHub.go
  • pkg/plugins/autodiscovery/githubaction/templateGHAGitea.go
  • pkg/plugins/resources/yaml/target_test.go
💤 Files with no reviewable changes: 3
  • pkg/plugins/autodiscovery/githubaction/templateGHAGitea.go
  • pkg/plugins/autodiscovery/githubaction/templateGHAGitHub.go
  • pkg/plugins/autodiscovery/githubaction/main_test.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

GitHub and Gitea autodiscovery templates no longer set the yamlpath engine on release, tag, and branch targets. YAML target tests cover multiline scalar updates and preservation of adjacent folded scalar content.

Changes: GitHub Actions YAML target updates

Layer / File(s) Summary
Folded scalar regression coverage
pkg/plugins/resources/yaml/target_test.go
Tests expect changed multiline values to use a literal block scalar. A new case checks that updating a neighboring uses value and adding a comment preserves the adjacent folded environment scalar and its contents.
Autodiscovery templates and expectations
pkg/plugins/autodiscovery/githubaction/templateGHAGitHub.go, pkg/plugins/autodiscovery/githubaction/templateGHAGitea.go, pkg/plugins/autodiscovery/githubaction/main_test.go
GitHub and Gitea release, tag, and branch targets no longer specify engine: 'yamlpath'. Autodiscovery test expectations reflect this across the tested scenarios.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested labels: autodiscovery

Suggested reviewers: olblak

Merge Risk: Minimal · previous review 93e39

The generated GitHub and Gitea targets remain compatible with the default YAML engine. No actionable merge risk is established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the GitHub Actions autodiscovery fix and the engine change that preserves folded scalars.
Description check Passed The description states the linked issue, explains the cause and fix, and provides a test command. It omits the optional checklist, tradeoff, and potential improvement sections, but it is otherwise suf…
Linked Issues check Passed Issue #8295 reports repeated blank-line growth in folded multiline YAML values during GitHub Actions autodiscovery. The GitHub and Gitea autodiscovery templates no longer force the yamlpath engine, so…
Out of Scope Changes check Passed The reported changes are limited to GitHub Actions autodiscovery YAML engine settings, corresponding manifest expectations, and YAML target regression tests. The Gitea template uses the same autodisco…
Full details: Description check

Explanation

The description states the linked issue, explains the cause and fix, and provides a test command. It omits the optional checklist, tradeoff, and potential improvement sections, but it is otherwise sufficiently complete.

Full details: Linked Issues check

Explanation

Issue #8295 reports repeated blank-line growth in folded multiline YAML values during GitHub Actions autodiscovery. The GitHub and Gitea autodiscovery templates no longer force the yamlpath engine, so their YAML targets use the default goyaml engine. The existing goyaml target compares decoded scalar values before replacement, and the added tests cover unchanged folded scalars, changed folded scalars, and preservation of a folded-scalar sibling. The linked issue has no additional coding acceptance criteria.

Full details: Out of Scope Changes check

Explanation

The reported changes are limited to GitHub Actions autodiscovery YAML engine settings, corresponding manifest expectations, and YAML target regression tests. The Gitea template uses the same autodiscovery path and the same engine change. These changes support the linked issue and do not demonstrate unrelated behavior.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@olblak
Merge branch 'main' into fix/githubaction-goyaml-engine
c98b397
@loispostula
loispostula requested a review from olblak October 30, 2026 12:31
@olblak
Merge branch 'main' into fix/githubaction-goyaml-engine
1173a93
@olblak olblak added the bug Something isn't working label Oct 30, 2026
olblak
olblak approved these changes Oct 30, 2026
View reviewed changes

@olblak olblak left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good to me, I thought we needed specific yamlpath syntax but that's good that we can use goyaml

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@olblak
Merge branch 'main' into fix/githubaction-goyaml-engine
fe74921
@olblak
olblak enabled auto-merge (squash) October 30, 2026 18:13
@olblak
olblak merged commit f1d1c07 into updatecli:main Oct 30, 2026
8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai coderabbitai Bot mentioned this pull request Nov 5, 2026
feat(github/action): add SHA pinning for Gitea/Forgejo #11217
Merged
1 of 2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@olblak olblak olblak approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

github action autodiscovery adds empty line to multiline key

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@loispostula @olblak
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.