Skip to content

Add XmlAdd extension to XmlTasks - #489

Merged
ITaluone merged 2 commits into
Fallout-build:mainfrom
ITaluone:feat/xml-task-for-adding
Jul 14, 2026
Merged

Add XmlAdd extension to XmlTasks#489
ITaluone merged 2 commits into
Fallout-build:mainfrom
ITaluone:feat/xml-task-for-adding

Conversation

@ITaluone

Copy link
Copy Markdown
Contributor

Closes #488

Adds an additional XmlElementBuilder for convenient node building

@ITaluone
ITaluone requested a review from a team as a code owner July 13, 2026 07:08
@ITaluone
ITaluone force-pushed the feat/xml-task-for-adding branch from 1e390a1 to 5c0bd19 Compare July 13, 2026 07:08
@ITaluone
ITaluone force-pushed the feat/xml-task-for-adding branch 3 times, most recently from 59c3adb to e47d38c Compare July 13, 2026 07:24
@ChrisonSimtian
ChrisonSimtian requested a review from Copilot July 13, 2026 07:44

Copilot AI 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.

Pull request overview

Adds a new XmlTasks.XmlAdd API plus a small fluent XmlElementBuilder to make inserting XML nodes (e.g., updating nuget.config feeds) more convenient within Fallout’s XML utilities.

Changes:

  • Add XmlTasks.XmlAdd(...) overloads to append new XML content at an XPath location.
  • Introduce XmlElementBuilder for fluent construction of XElement trees.
  • Add specs + Verify snapshot covering common and “real world” nuget.config usage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
tests/Fallout.Common.Specs/XmlTasksSpecs.cs Adds specs for XmlAdd (builder + string) and XmlElementBuilder behaviors, plus a Verify-based nuget.config scenario.
tests/Fallout.Common.Specs/XmlTasksSpecs.A_real_world_use_case.verified.txt Snapshot for expected pretty-printed output after adding a package source.
src/Fallout.Common/IO/XmlTasks.cs Adds XmlAdd, refactors saving into Save, and adjusts some method formatting.
src/Fallout.Common/IO/XmlElementBuilder.cs New fluent builder for producing XElement instances used by XmlAdd and tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Fallout.Common/IO/XmlTasks.cs Outdated
Comment thread src/Fallout.Common/IO/XmlTasks.cs Outdated
Comment thread src/Fallout.Common/IO/XmlElementBuilder.cs Outdated
Comment thread src/Fallout.Common/IO/XmlElementBuilder.cs
@ITaluone
ITaluone force-pushed the feat/xml-task-for-adding branch 3 times, most recently from f866458 to 878bef9 Compare July 13, 2026 08:13
@ITaluone ITaluone added enhancement New feature or request target/vCurrent Targets the current version labels Jul 13, 2026
@ITaluone
ITaluone force-pushed the feat/xml-task-for-adding branch from 878bef9 to 8e634f2 Compare July 13, 2026 09:13
# Conflicts:
#	tests/Fallout.Common.Specs/XmlTasksSpecs.cs
@ITaluone
ITaluone force-pushed the feat/xml-task-for-adding branch from 8e634f2 to 8fe11b9 Compare July 13, 2026 11:22
@ITaluone
ITaluone enabled auto-merge (rebase) July 13, 2026 11:22
@ITaluone
ITaluone disabled auto-merge July 13, 2026 11:23
@IT-VBFK

IT-VBFK commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Out of curiosity... how many approvals do we seek before merging?

Comment thread src/Fallout.Common/IO/XmlTasks.cs Outdated
@ITaluone
ITaluone force-pushed the feat/xml-task-for-adding branch from 8eb4259 to a17f2c3 Compare July 14, 2026 05:23
@ITaluone
ITaluone force-pushed the feat/xml-task-for-adding branch from a17f2c3 to 8ef16e5 Compare July 14, 2026 05:41
@ITaluone
ITaluone enabled auto-merge (rebase) July 14, 2026 05:43
@ITaluone
ITaluone merged commit c277189 into Fallout-build:main Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend XmlTasks with a new extension for adding nodes

5 participants