fix!: `CreateHostedRunnerRequest`, `UpdateHostedRunnerRequest` instead of `HostedRunnerRequest` by alexandear · Pull Request #3973 · google/go-github
BREAKING CHANGE: ActionsService.CreateHostedRunner and EnterpriseService.CreateHostedRunner now accept CreateHostedRunnerRequest; ActionsService.UpdateHostedRunner and EnterpriseService.UpdateHostedRunner now accept UpdateHostedRunnerRequest.
While working on #3972, I found that ActionsService.UpdateHostedRunner accepts HostedRunnerRequest as a body. But it's wrong according to the docs for actions and enterprise.
Current:
type HostedRunnerRequest struct { Name string `json:"name,omitempty"` Image HostedRunnerImage `json:"image,omitempty"` RunnerGroupID int64 `json:"runner_group_id,omitempty"` Size string `json:"size,omitempty"` MaximumRunners int64 `json:"maximum_runners,omitempty"` EnableStaticIP bool `json:"enable_static_ip,omitempty"` ImageVersion string `json:"image_version,omitempty"` }
Should be image_id (optional) instead of the Image. So, I created a separate struct UpdateHostedRunnerRequest with an optional image_id and the rest of the fields (all optional).