feat(ir): add typed helper for CopyFiles@2#1017
Merged
Merged
Conversation
Adds copy_files_step() to src/compile/ir/tasks.rs — a typed factory function for the CopyFiles@2 ADO built-in task. Required inputs (Contents, TargetFolder) are positional parameters. Optional inputs (SourceFolder, CleanTargetFolder, OverWrite, flattenFolders, preserveTimestamp, retryCount, delayBetweenRetries, ignoreMakeDirErrors) are applied via .with_input() on the returned TaskStep, matching the established pattern. Three unit tests cover: required inputs, SourceFolder via with_input, and optional boolean flags. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jamesadevine
approved these changes
Jun 15, 2026
Open
Collaborator
|
@copilot resolve merge conflicts |
…-97ecf6efe614c1f2 # Conflicts: # src/compile/ir/tasks.rs Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Contributor
jamesadevine
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a typed factory function for
CopyFiles@2to the ado-aw IR.Motivation
Previously, any code that needed to emit a
CopyFiles@2step had to hand-craftTaskStep::new("CopyFiles@2", ...)with raw string inputs. This PR introduces awell-typed
copy_files_step()helper that makes required inputs explicit at thecall site and provides a clear, self-documenting API consistent with the patterns
already established for
publish_test_results_step.Changes
src/compile/ir/tasks.rs:copy_files_step(contents, target_folder)factory function with full doc comment covering all 8 optional inputssrc/compile/ir/tasks.rs: 3 unit tests covering required inputs, optionalSourceFolder, and optional boolean flagsADO Task Reference
CopyFiles@2Contents,TargetFolderSourceFolder,CleanTargetFolder,OverWrite,flattenFolders,preserveTimestamp,retryCount,delayBetweenRetries,ignoreMakeDirErrorsValidation
cargo build --all-targetscargo test— all 1856+ tests pass, 3 new tests forcopy_files_stepcargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.