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

Danger fails on PRs with no body #236

Closed
davdroman opened this issue May 20, 2019 · 1 comment · Fixed by #237
Closed

Danger fails on PRs with no body #236

davdroman opened this issue May 20, 2019 · 1 comment · Fixed by #237

Comments

@davdroman
Copy link

ERROR: Failed to parse JSON: valueNotFound(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "danger", intValue: nil), CodingKeys(stringValue: "github", intValue: nil), CodingKeys(stringValue: "issue", intValue: nil), CodingKeys(stringValue: "body", intValue: nil)], debugDescription: "Expected String value but found null instead.", underlyingError: nil))
ERROR: Dangerfile eval failed at Dangerfile.swift

Explanation: on PRs with no body set, GitHub most likely returns null for the issue's body instead of an empty string, which Danger cannot parse through Codable probably because the body property is non-optional.

Whilst PRs with no description are not very useful, this tool should be resilient enough to handle such a case.

I'll try and come up with a fix for this and make a PR for it.

@davdroman
Copy link
Author

A fix is now pending review @ #237.

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 a pull request may close this issue.

1 participant