{{ message }}
Add return_run_details parameter to Workflow.create_dispatch#3471
Open
SebastienSyd wants to merge 1 commit into
Open
Add return_run_details parameter to Workflow.create_dispatch#3471SebastienSyd wants to merge 1 commit into
SebastienSyd wants to merge 1 commit into
Conversation
Implements support for GitHub's workflow dispatch `return_run_details` parameter (API version 2026-03-10) which returns immediate workflow run details when triggering a workflow dispatch event. When `return_run_details=True`, the method now returns a `WorkflowRun` object containing `id`, `url`, and `html_url` of the triggered run, instead of a boolean. This enables immediate access to the run details without polling or searching, and allows calling methods like `cancel()`, `rerun()`, and `get_jobs()` on the returned object. The feature maintains backward compatibility - when `return_run_details=False` (default), it continues to return a boolean as before. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
dc4ce31 to
7a2a901
Compare
Contributor
Author
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
Implements support for GitHub's workflow dispatch
return_run_detailsparameter (API version 2026-03-10) that returns immediate workflow run details when triggering a workflow dispatch event.cf. doc here: https://docs.github.com/en/rest/actions/workflows?apiVersion=2026-03-10&versionId=free-pro-team%40latest&category=actions#create-a-workflow-dispatch-event
Changes
return_run_detailsboolean parameter toWorkflow.create_dispatch()(default:False)return_run_details=True, returns aWorkflowRunobject instead of a booleanFalse(default)testCreateDispatchWithReturnRunDetailswith replay dataBenefits
cancel(),rerun(),get_jobs()on the returnedWorkflowRunobjectExample Usage
Test plan
throw=Trueandthrow=Falsecode paths tested