GeezerVison is showing github.com — fix(autodiscovery/githubaction): use goyaml engine to preserve folded scalars by loispostula · Pull Request #11006 · updatecli/updatecli
Conversation
loispostula
commented
Oct 23, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
… 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
Bot
commented
Oct 23, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

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:
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: 4 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
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 checks: 4 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly identifies the GitHub Actions autodiscovery fix and the engine change that preserves folded scalars. |
| Description check |
 |
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 |
 |
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 |
 |
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)
-
- 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
-
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
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
Milestone
No milestone
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.
|