Skip to content

feat(ir): add typed helper for DeleteFiles@1#1071

Merged
jamesadevine merged 2 commits into
mainfrom
feat/ir-delete-files-v1-e514a82e89581322
Jun 17, 2026
Merged

feat(ir): add typed helper for DeleteFiles@1#1071
jamesadevine merged 2 commits into
mainfrom
feat/ir-delete-files-v1-e514a82e89581322

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a typed factory function delete_files_step() for DeleteFiles@1 to the ado-aw IR.

Motivation

Previously, any code that needed to emit a DeleteFiles@1 task step had to hand-craft TaskStep::new("DeleteFiles@1", ...) with raw string inputs. This PR introduces a well-typed helper that makes the required/optional input boundary explicit and provides a clear, self-documenting API consistent with the other helpers in src/compile/ir/tasks.rs.

Changes

  • src/compile/ir/tasks.rs: delete_files_step() factory function with 5 unit tests

ADO Task Reference

API

// Delete all .tmp files under the working directory
delete_files_step("**/*.tmp")

// Wipe the entire staging directory
delete_files_step("*")
    .with_input("SourceFolder", "$(Build.ArtifactStagingDirectory)")
    .with_input("RemoveSourceFolder", "true")

// Multiple patterns + dot files
delete_files_step("**/*.tmp\n**/*.log\ndist/")
    .with_input("RemoveDotFiles", "true")

Validation

  • cargo build --all-targets
  • cargo test delete_files — 5 tests pass
  • cargo clippy --all-targets --all-features --workspace -- -D warnings

Created by the ado-task-ir-contributor workflow.

Generated by ADO Task IR Contributor · 956.8 AIC · ⌖ 19.8 AIC · ⊞ 36.6K ·

Adds `delete_files_step()` to `src/compile/ir/tasks.rs` — a typed
factory for the ADO `DeleteFiles@1` task.

Required input (`Contents`) is a positional parameter; optional inputs
(`SourceFolder`, `RemoveSourceFolder`, `RemoveDotFiles`) are applied
via the existing `.with_input(…)` builder on the returned `TaskStep`.

Five unit tests are included covering:
- default (required-only) construction
- optional `SourceFolder`
- `RemoveSourceFolder` flag
- `RemoveDotFiles` flag
- multiline `Contents` patterns

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Jun 17, 2026
@jamesadevine jamesadevine marked this pull request as ready for review June 17, 2026 14:04
@jamesadevine

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>

Copilot AI commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts and pushed the merge commit: 543e9d5.

Copilot AI requested a review from jamesadevine June 17, 2026 14:15
@jamesadevine jamesadevine merged commit 8d8dbb2 into main Jun 17, 2026
@jamesadevine jamesadevine deleted the feat/ir-delete-files-v1-e514a82e89581322 branch June 17, 2026 14:24
github-actions Bot added a commit that referenced this pull request Jun 17, 2026
…, DeleteFiles@1 helpers to ir.mdx

Three typed helpers added in #1063, #1065, and #1071 were missing from
the site docs. This patch:

- Adds three rows to the Available helpers table in ir.mdx
- Updates the tasks.rs module-layout bullet to list all 12 helpers
- Updates the cross-reference sentence in extending.mdx to mention the
  three new entries

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants