Skip to content

Add support for workflows run id#5

Merged
caleblloyd merged 2 commits intocode-cargo:boxbuildfrom
mtmk:add-support-for-workflows-run-id
Mar 9, 2026
Merged

Add support for workflows run id#5
caleblloyd merged 2 commits intocode-cargo:boxbuildfrom
mtmk:add-support-for-workflows-run-id

Conversation

@mtmk
Copy link
Copy Markdown

@mtmk mtmk commented Mar 9, 2026

The Workflow Dispatch API can now return the Run ID:

https://github.blog/changelog/2026-02-19-workflow-dispatch-api-now-returns-run-ids/

  • Add DispatchesPostResponse model
  • Add unit test for DispatchesRequestBuilder

- Add DispatchesPostResponse model
- Add unit test for DispatchesRequestBuilder
Copilot AI review requested due to automatic review settings March 9, 2026 15:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the GitHub Actions workflow dispatch client to support the new API behavior where workflow_dispatch can return run details (including a run ID) when return_run_details is enabled.

Changes:

  • Introduces a new DispatchesPostResponse model to represent the run details response payload.
  • Updates DispatchesRequestBuilder.PostAsync to return DispatchesPostResponse instead of Task/no-content behavior.
  • Adds unit tests validating PostAsync returns the expected response and still throws on null body.

Reviewed changes

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

File Description
test/Dispatches/DispatchesRequestBuilderTest.cs Adds tests for PostAsync returning a parsed response payload (run id + URLs) and null-body validation.
src/GitHub/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesRequestBuilder.cs Changes PostAsync from “no content” to deserializing and returning a DispatchesPostResponse.
src/GitHub/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesPostResponse.cs Adds the response model for workflow_dispatch when return_run_details is true.

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

@caleblloyd caleblloyd merged commit 682655b into code-cargo:boxbuild Mar 9, 2026
1 check passed
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.

3 participants