Skip to content

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

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 Nov 22, 2021 · 0 comments
Open

Comments

@xmo-odoo
Copy link

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?
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

2 participants