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

MissingFieldException: Field 'issue' is required, but it was missing #165

Open
VictorPascualV opened this issue Apr 22, 2021 · 5 comments
Open

Comments

@VictorPascualV
Copy link

I'm getting this error when trying to run Danger from CI (Github Actions):

Executing $(which danger) ci --process danger-kotlin --passURLForDSL --failOnErrors --no-publish-check - pid 1
Executing kotlinc -script-templates systems.danger.kts.DangerFileScript -cp /usr/local/lib/danger/danger-kotlin.jar -script Dangerfile.df.kts /tmp/danger-dsl.json danger_out.json - pid 24

kotlinx.serialization.MissingFieldException: Field 'issue' is required, but it was missing

	at systems.danger.kotlin.models.github.GitHub.<init>(GitHub.kt)
	at systems.danger.kotlin.models.github.GitHub$$serializer.deserialize(GitHub.kt)
	at systems.danger.kotlin.models.github.GitHub$$serializer.deserialize(GitHub.kt:14)
	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:63)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:33)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:41)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:72)
	at systems.danger.kotlin.models.danger.DangerDSL$$serializer.deserialize(DangerDSL.kt)
	at systems.danger.kotlin.models.danger.DangerDSL$$serializer.deserialize(DangerDSL.kt:15)
	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:63)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:33)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:41)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:63)
	at systems.danger.kotlin.models.danger.DSL$$serializer.deserialize(DangerDSL.kt)
	at systems.danger.kotlin.models.danger.DSL$$serializer.deserialize(DangerDSL.kt:10)
	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:63)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:33)
	at kotlinx.serialization.json.Json.decodeFromString(Json.kt:85)
	at systems.danger.kotlin.MainDangerRunner.<init>(MainDangerRunner.kt:130)
	at systems.danger.kotlin.MainScriptKt.Danger(MainScript.kt:39)
	at Dangerfile_df.<init>(Dangerfile.df.kts:225)

Could it be related to our organisation not using Github Issues feature at all? 🤔

I only found that issue when running Danger in CI, it was working as a charm when using:
danger-kotlin pr https://github.com/myOrg/myRepo/pull/123 from my machine.

@gianluz
Copy link
Member

gianluz commented Apr 27, 2021

looks an optional field marked as required to me 🤔

@cmunaro
Copy link

cmunaro commented Jun 21, 2021

Hi, I'm facing the same problem, how can It be solved?

@orta
Copy link
Member

orta commented Jun 22, 2021

Send a PR which changes the right field to optional is probably your best solution 👍🏻

@tegorov
Copy link
Contributor

tegorov commented Jul 14, 2021

Hi, @munez07. Can you please show the workflow file?

@gianluz
Copy link
Member

gianluz commented Dec 12, 2022

@VictorPascualV is this still an issue for you?

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

5 participants