feat: Support workflow dispatch run details in response#4028
feat: Support workflow dispatch run details in response#4028LinaKACI-pro wants to merge 1 commit intogoogle:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Nice, thanks for working on this - I saw the GitHub Changelog post about this yesterday and was planning to contribute this today but you beat me to it! I'm excited to remove our project's workaround for getting the run URL once this is merged and released! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4028 +/- ##
=======================================
Coverage 94.07% 94.07%
=======================================
Files 207 207
Lines 19163 19167 +4
=======================================
+ Hits 18028 18032 +4
Misses 936 936
Partials 199 199 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BREAKING CHANGE:
CreateWorkflowDispatchEventByIDandCreateWorkflowDispatchEventByFileNamenow return*CreateWorkflowDispatchEventResponse.Summary
Resolves #4027
ReturnRunDetailsfield toCreateWorkflowDispatchEventRequestto support the newreturn_run_detailsAPI parameterCreateWorkflowDispatchEventResponsestruct withWorkflowRunID,RunURL, andHTMLURLfieldsCreateWorkflowDispatchEventByIDandCreateWorkflowDispatchEventByFileNameto return(*CreateWorkflowDispatchEventResponse, *Response, error)instead of(*Response, error)ReturnRunDetails: true(200 OK with body) and omitted (204 No Content) casesBreaking change
The method signatures for
CreateWorkflowDispatchEventByIDandCreateWorkflowDispatchEventByFileNamechanged from returning(*Response, error)to(*CreateWorkflowDispatchEventResponse, *Response, error).API reference
https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event
Manual test
Tested against a real repository with a
workflow_dispatchworkflow using the following program:To reproduce, create a test program in a separate directory and use
go.modreplaceto point to the local changes:Then run:
Test program