danger / kotlin

⚠️ Stop saying "you forgot to …" in code review
MIT License
505 stars 50 forks source link

JsonDecodingException on approvals_before_merge #226

Closed pinguinjkeke closed 2 years ago

pinguinjkeke commented 2 years ago

Hello. I'm catching an exception, because approvals_before_merge field is null. According to GitLab doc this field is not required in the response and can be null.

Compiling Dangerfile Dangerfile.df.kts
Executing kotlinc -script-templates systems.danger.kts.DangerFileScript -cp /usr/local/lib/danger/danger-kotlin.jar -script Dangerfile.df.kts /var/folders/5q/4nc5x9yd6mvcpzd_g_cwjdyc0000gn/T/danger-dsl.json danger_out.json - pid 78358

kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 95589: Unexpected symbol 'n' in numeric literal
JSON input: .....    "approvals_before_merge": null,
        "subscribed": fa.....