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

fix: change products and powerups type in organization struct #95

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

kolaente
Copy link
Contributor

It looks like Trello changed this from a string value to an integer. I searched around in their api docs but couldn't really find anything about this so I just assumed int (not uint, int64, etc).

Before this patch, I got an error message like this:

JSON decode failed on https://api.trello.com/1/organizations/<uuuid>
{"id":"uuuid","name":"lorem-ipsum","displayName":"Lorem Ipsum","desc":"","descData":{"emoji":{}},"url":"https://trello.com/w/lorem-ipsum","website":"http://example.com/","teamType":null,"logoHash":"affffe","logoUrl":"https://trello-logos.s3.amazonaws.com/some-uid","offering":"trello.business_class","products":[110],"powerUps":[110]}: json: cannot unmarshal number into Go struct field Organization.products of type string

It looks like Trello changed this from a string value to an integer. I searched around in [their api docs](https://developer.atlassian.com/cloud/trello/rest/api-group-organizations/#api-organizations-id-get) but couldn't really find anything about this so I just assumed int (not uint, int64, etc).
@adlio
Copy link
Owner

adlio commented Apr 11, 2024

Hey, thanks for the contribution! I'm looking to do some updates soon and am happy to accept. I see there is test coverage over this type already, but the tests all had an empty array for powerUps. Would you mind adding tests with realistic data?

@kolaente
Copy link
Contributor Author

Added some, is that what you had in mind?

@adlio adlio merged commit ca63de6 into adlio:main Apr 15, 2024
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.

None yet

2 participants