Open Zimmi48 opened 2 years ago
The error message is pretty clear: we need to fix the request in the following way:
- mutation newCheckRun($name: String!, $repoId: ID!, $headSha: String!,
+ mutation newCheckRun($name: String!, $repoId: ID!, $headSha: GitObjectID!,
$status: RequestableCheckStatusState!, $title: String!, $text: String, $summary: String!,
- $url: String!, $conclusion: CheckConclusionState, $externalId: String) {
+ $url: URI!, $conclusion: CheckConclusionState, $externalId: String) {
Unfortunately, this means using a custom scalar, and it seems like this has not been implemented yet in graphql-ppx (https://github.com/teamwalnut/graphql-ppx/issues/272).
At the moment, the only workaround I can imagine is to intercept and patch the request before sending it (around this point): https://github.com/coq/bot/blob/15a4b50d576904f5d1643ce761b85133700ecbae/bot-components/GitHub_mutations.ml#L134
The tested hackish workaround (d9c1d87) seems to work.
I still don't understand the cause, has the GitHub API changed?
From what I can tell, GitHub's API used to tolerate that we use the String
type when it was expecting custom scalars instead. I couldn't find anything in the changelog that would indicate that GitHub's API has become stricter with respect to this, but maybe they are considering this a bug fix not worth documentation?
The explanation from GitHub is that they have upgraded their graphql-ruby
dependency from 1.11.10 to 1.12.24, and the new version started correctly enforcing the types.
The creation of some check runs have failed in the last hours / days (?). An example failed query (that I could reproduce) is:
with variables:
leading to the following error: