Skip to content

feat(ir): add typed builder for GitHubRelease@1#1164

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
feat/ir-github-release-builder-4309d1f9d6152de9
Draft

feat(ir): add typed builder for GitHubRelease@1#1164
github-actions[bot] wants to merge 1 commit into
mainfrom
feat/ir-github-release-builder-4309d1f9d6152de9

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a typed builder struct for GitHubRelease@1 to the ado-aw IR.

Motivation

Previously, any code that needed to emit a GitHubRelease@1 step had to hand-craft TaskStep::new(...) with raw string input keys. This PR introduces a typed command-dispatch builder following the docker.rs template, so:

  • gitHubConnection and repositoryName are required positional parameters of all three constructors
  • Each action's inputs live in its own variant, so invalid input/action combinations (e.g. tag_source on a delete) are unrepresentable
  • All constrained input values are typed enums with as_ado_str() returning the exact ADO token

Changes

  • src/compile/ir/tasks/github_release.rs: new GitHubRelease builder with:
    • GitHubReleaseAction enum (Create, Edit, Delete)
    • GitHubReleaseCreate / GitHubReleaseEdit / GitHubReleaseDelete action-data structs
    • Typed enums: TagSource, ReleaseNotesSource, AssetUploadMode, MakeLatest, ChangeLogCompareToRelease, ChangeLogType
    • 8 #[cfg(test)] unit tests covering all three actions and the enum variants
  • src/compile/ir/tasks/mod.rs: pub mod github_release; declaration (alphabetical order)

ADO Task Reference

  • Task: GitHubRelease@1
  • Docs: (https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/github-release-v1)
  • Required inputs (all actions): gitHubConnection, repositoryName, action
  • Required for edit/delete: tag
  • Optional for create: target, tagSource, tag, tagPattern, title, releaseNotesSource, assets, isDraft, isPreRelease, makeLatest, addChangeLog, plus changelog configuration
  • Optional for edit: same as create (minus tagSource/tagPattern) plus assetUploadMode

Validation

  • cargo build --all-targets
  • cargo test (2186 unit tests pass)
  • cargo clippy --all-targets --all-features --workspace -- -D warnings

Created 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.com
  • spsprodweu4.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "spsprodeus21.vssps.visualstudio.com"
    - "spsprodweu4.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by ADO Task IR Contributor · 1.7K AIC · ⌖ 49.6 AIC · ⊞ 38K ·

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>
@github-actions github-actions Bot mentioned this pull request Jun 23, 2026
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.

0 participants