Skip to content

[3008.x] Add 'show_changes' to "file.append" and "file.prepend" state functions#69141

Merged
dwoz merged 4 commits into
saltstack:3008.xfrom
meaksh:3008.x-master-add-show_changes-to-file-append
May 24, 2026
Merged

[3008.x] Add 'show_changes' to "file.append" and "file.prepend" state functions#69141
dwoz merged 4 commits into
saltstack:3008.xfrom
meaksh:3008.x-master-add-show_changes-to-file-append

Conversation

@meaksh
Copy link
Copy Markdown
Contributor

@meaksh meaksh commented May 13, 2026

What does this PR do?

This PR adds the show_changes argument to file.append and file.prepend state functions in order to allow hiding the diff of the content as part of the output. Same behavior that file.managed state and others.

What issues does this PR fix or reference?

Fixes #59329 and #67533

Previous Behavior

The output from file.append and file.prepend executions always contains a "diff" when files are text files.

New Behavior

By default, the "diff" is included, but this can be skipped when show_changes is set to False.

Merge requirements satisfied?

Commits signed with GPG?

Yes

@meaksh meaksh requested a review from a team as a code owner May 13, 2026 10:20
@meaksh meaksh changed the title 3008.x master add show changes to file append [3008.x] Add 'show_changes' to "file.append" and "file.prepend" state functions May 13, 2026
@dwoz dwoz merged commit 75d0a5e into saltstack:3008.x May 24, 2026
535 checks passed
@meaksh meaksh deleted the 3008.x-master-add-show_changes-to-file-append branch May 25, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants