Skip to content

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

Open
@xmo-odoo

Description

@xmo-odoo

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions