feat(ir): add typed builder for GitHubRelease@1#1164
Draft
github-actions[bot] wants to merge 1 commit into
Draft
feat(ir): add typed builder for GitHubRelease@1#1164github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Adds a typed builder struct for `GitHubRelease@1` to the ado-aw IR. GitHubRelease@1 is a command-dispatch task (create/edit/delete). Each action variant carries its own set of required and optional inputs, so invalid input/action combinations are unrepresentable. Typed enums cover all constrained inputs (TagSource, ReleaseNotesSource, AssetUploadMode, MakeLatest, ChangeLogCompareToRelease, ChangeLogType). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
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 builder struct for
GitHubRelease@1to the ado-aw IR.Motivation
Previously, any code that needed to emit a
GitHubRelease@1step had to hand-craftTaskStep::new(...)with raw string input keys. This PR introduces a typed command-dispatch builder following thedocker.rstemplate, so:gitHubConnectionandrepositoryNameare required positional parameters of all three constructorstag_sourceon adelete) are unrepresentableas_ado_str()returning the exact ADO tokenChanges
src/compile/ir/tasks/github_release.rs: newGitHubReleasebuilder with:GitHubReleaseActionenum (Create,Edit,Delete)GitHubReleaseCreate/GitHubReleaseEdit/GitHubReleaseDeleteaction-data structsTagSource,ReleaseNotesSource,AssetUploadMode,MakeLatest,ChangeLogCompareToRelease,ChangeLogType#[cfg(test)]unit tests covering all three actions and the enum variantssrc/compile/ir/tasks/mod.rs:pub mod github_release;declaration (alphabetical order)ADO Task Reference
GitHubRelease@1gitHubConnection,repositoryName,actionedit/delete:tagcreate:target,tagSource,tag,tagPattern,title,releaseNotesSource,assets,isDraft,isPreRelease,makeLatest,addChangeLog, plus changelog configurationedit: same ascreate(minustagSource/tagPattern) plusassetUploadModeValidation
cargo build --all-targetscargo test(2186 unit tests pass)cargo 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.