Skip to content

[Schema Inaccuracy] head.label and head.user can be null in pull-request schema #916

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

Open
xmo-odoo opened this issue Feb 21, 2022 · 1 comment

Comments

@xmo-odoo
Copy link

xmo-odoo commented Feb 21, 2022

Schema Inaccuracy

The current schema for #/components/schemas/pull-request defines head.label and head.user as required.

Expected

head.label and head.user should have nullable: true with the nullability conditions documented (from what I understand, if the user's account was deleted for some reason: all the cases I can see are for "ghost" users)

Reproduction Steps

❯ curl -s https://api.github.com/repos/odoo/odoo/pulls/51976 | jq .head
{
  "label": null,
  "ref": "12.0",
  "sha": "3cf7aba2e293417c6e8a6a4785624c8315ccbb7a",
  "user": null,
  "repo": null
}

Side-note

The same issue was fixed for head.repo as reported in #161 and #424, would be nice to also add a description to that property explaining the conditions under which it can be null.

@cartalaba
This comment was marked as spam.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@ahoglund @xmo-odoo @cartalaba and others