Skip to content

Accept null values in Release, User, and License fields - #255

Merged
SeanTAllen merged 1 commit into
mainfrom
issue-233-235-nullable-fields
Dec 5, 2026
Merged

SeanTAllen merged 1 commit into
mainfrom
issue-233-235-nullable-fields

Conversation

@SeanTAllen

Copy link
Copy Markdown
Member

GitHub's API description allows null for a release's name, body,
and published_at, a user's gravatar_id, and a license's url and
spdx_id. The converters read them as strings, so a response with null
in any of them failed to convert, including any model that requires a
user whose gravatar is null. These
fields are now (String | None); a release's body is also None when
it is absent, since the schema doesn't require it.

With License.url nullable, Repository.license no longer needs to turn
a license that fails to convert into None. GitHub's "Other" license now
comes through, and a malformed license fails the repository conversion,
as the other optional nested objects already do.

This covers the fields chosen in #250. That issue stays open for the
other fields GitHub's schema marks nullable.

Closes #233
Closes #235

GitHub's API description allows `null` for a release's `name`, `body`,
and `published_at`, a user's `gravatar_id`, and a license's `url` and
`spdx_id`. The converters read them as strings, so a response with null
in any of them failed to convert, including any model that requires a
user whose gravatar is null. These
fields are now `(String | None)`; a release's `body` is also `None` when
it is absent, since the schema doesn't require it.

With `License.url` nullable, `Repository.license` no longer needs to turn
a license that fails to convert into `None`. GitHub's "Other" license now
comes through, and a malformed license fails the repository conversion,
as the other optional nested objects already do.

This covers the fields chosen in #250. That issue stays open for the
other fields GitHub's schema marks nullable.

Closes #233
Closes #235
@SeanTAllen SeanTAllen added the changelog - changed Automatically add "Changed" CHANGELOG entry on merge label Dec 5, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Dec 5, 2026
@SeanTAllen
SeanTAllen merged commit 038904e into main Dec 5, 2026
9 checks passed
@SeanTAllen
SeanTAllen deleted the issue-233-235-nullable-fields branch December 5, 2026 18:54
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Dec 5, 2026
github-actions Bot pushed a commit that referenced this pull request Dec 5, 2026
github-actions Bot pushed a commit that referenced this pull request Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog - changed Automatically add "Changed" CHANGELOG entry on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User conversion fails when gravatar_id is null Repositories with an "Other" license lose their license

2 participants