-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 JSON protection unmarshal error #2606
Conversation
Currently when trying to load in protection an error is thrown due to a data structure mismatch resulting in errors: json: cannot unmarshal object into Go struct field Protection.lock_branch of type bool json: cannot unmarshal object into Go struct field Protection.allow_fork_syncing of type bool This is due to them using an enabled field which the current structure does not understand. This change introduces the relevant structure and has been tested locally. Signed-off-by: Jason Field <jason@avon-lea.co.uk>
Codecov Report
@@ Coverage Diff @@
## master #2606 +/- ##
=======================================
Coverage 97.99% 97.99%
=======================================
Files 126 126
Lines 10913 10913
=======================================
Hits 10694 10694
Misses 150 150
Partials 69 69
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @xorima !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you, @valbeat ! |
Thanks @gmlewis, can we get a release cut in the next week or two so I don't have to continue to use my fork? |
Sure I'll try to take a look in the morning @gmlewis |
Description of change
Currently when trying to load in protection an error is thrown due to a data structure mismatch resulting in errors:
This is due to them using an enabled field which the current structure does not understand. This change introduces the relevant structure and has been tested locally.
API Payload:
As can be seen on the payload above they are under the
enabled
key and are not bool fields directly in their own right.Signed-off-by: Jason Field jason@avon-lea.co.uk