Skip to content

[Possible Schema Inaccuracy] multiple PR fields have odd description #691

Open
@xmo-odoo

Description

@xmo-odoo

I'm not entirely sure that these are schema inaccuracies but multiple fields of PRs (specifically the "pull-request" response / schema) have an odd definition:

  • mergeable is a nullable boolean field,it is not otherwise documented, it's hard to fathom why a PR would be something other than "mergeable" and "not mergeable". Either the field should be marked required, or the behaviour should be explained (I guess "we don't know if it's mergeable yet" is possible but in that case why not just set it to non-mergeable?).
  • draft is somewhat similarly an optional boolean, it's not clear when it would be absent (possibly projects which don't support / allow draft PRs? still why have that in the response rather than just false?)
  • rebaseable is both nullable and optional, same remarks as above.
  • mergeable_state is completely undocumented aside from knowing it's a string. Looking at the GraphQL API, it the example value ("clean") matches the MergeStateStatus enum. If this is the right conversion, mergeable_state should be defined as an enum with those values provided (and documented as they are in the graphql schema, maybe).
  • the assignees, requested_reviewers, and requested_teams` properties are all nullable optional arrays, the parameters of the fields being null or missing (as opposed to just empty) are not explained, is there really a reason for them to be so?

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