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: Installation Struct Missing for CommitCommentPayload, IssueCommentPayload and IssuesPayload #178

Conversation

Fish-Nullify
Copy link
Contributor

This pull request fixes issue #177

@coveralls
Copy link

coveralls commented Jul 13, 2023

Coverage Status

coverage: 88.639% (-1.1%) from 89.716% when pulling e8574e3 on Fish-Nullify:issues-and-commits-installation-id into 69430a8 on go-playground:master.

@robinlieb
Copy link
Member

Hi @Fish-Nullify,
Since this field is optional on the mentioned payloads, would it make sense to treat the installation struct accordingly? Something like:

Installation *struct {
	ID int64 `json:"id"`
} `json:"installation,omitempty"`

@deankarn do you have an opinion on that?

@Fish-Nullify
Copy link
Contributor Author

Hi @robinlieb,

Thanks for the suggestion and I have provided an update to the installation structs for the specified payloads. I can easily revert this if necessary.

@deankarn
Copy link
Collaborator

@robinlieb I agree, if it’s optional then let’s make it a pointer.

@Fish-Nullify omitempty only works for Serialization in Go and not Deserialization.

@robinlieb
Copy link
Member

@Fish-Nullify could you them please make the installation struct a pointer and remove the omitempty? Like:

Installation *struct {
	ID int64 `json:"id"`
} `json:"installation"`

@Fish-Nullify
Copy link
Contributor Author

@robinlieb sorry for the late reply was away, but made the installation struct a pointer and removed the omitempty

@robinlieb robinlieb merged commit 61716b8 into go-playground:master Aug 6, 2023
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.

4 participants