Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetReleaseDefinition fails when using scheduled days #92

Open
GitHubJens opened this issue Nov 19, 2020 · 1 comment
Open

GetReleaseDefinition fails when using scheduled days #92

GitHubJens opened this issue Nov 19, 2020 · 1 comment

Comments

@GitHubJens
Copy link

When using this config in Azure DevOps:
bilde

We get this error:
"json: cannot unmarshal number into Go struct field ReleaseSchedule.environments.schedules.daysToRelease of type release.ScheduleDays"

Returned from:
releaseDefinitionObject, err := releaseClient.GetReleaseDefinition(ctx,
getReleaseDefinitionArgs)
if err != nil {
log.Fatal(err)
}

Its this function that is throwing the error:

func (client *Client) UnmarshalBody(response *http.Response, v interface{}) (err error) {

And it is used by the function:

func (client *ClientImpl) GetReleaseDefinition(ctx context.Context, args GetReleaseDefinitionArgs) (*ReleaseDefinition, error) {

@DTB4N
Copy link

DTB4N commented Jan 17, 2024

I confirm this one
The library uses string names like "none", "Monday", "tuesday", "all", but in actual response from API we get both numbers and string numbers like 42 or "127"
Screenshot 2024-01-17 at 11 24 05
Screenshot 2024-01-17 at 11 24 13

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

No branches or pull requests

2 participants