$ jq -c '.components.schemas["webhook-workflow-run-in-progress"].properties.workflow_run.properties | [has("display_title"), .conclusion.nullable, (.conclusion.enum | index(null))]' api.github.com.2022-11-28.json
[false,true,null]
$ jq -c '.components.schemas["webhook-workflow-run-completed"].properties.workflow_run.properties | [has("display_title"), (.actor.properties | has("user_view_type"))]' api.github.com.2022-11-28.json
[true,true]
$ jq -c '[.components.schemas["webhook-pull-request-review-thread-resolved", "webhook-pull-request-review-thread-unresolved"].properties.pull_request.properties.head.properties.repo.nullable]' api.github.com.2022-11-28.json
[true,null]
$ jq -c '[.components.schemas["webhook-pull-request-review-thread-resolved", "webhook-pull-request-review-thread-unresolved"].properties.thread.properties.comments.items.properties.original_line.nullable]' api.github.com.2022-11-28.json
[true,null]
$ jq -c '[.components.schemas["webhook-pull-request-review-submitted", "webhook-pull-request-review-dismissed", "webhook-pull-request-review-edited"].properties.pull_request.properties.head.properties.label.nullable]' api.github.com.2022-11-28.json
[true,null,null]
$ jq -c '[(.components.schemas["simple-check-suite"].properties | has("deployment")), (.components.examples["check-run-created"].value.check_run.check_suite | has("deployment"))]' api.github.com.2022-11-28.json
[false,true]
Schema Inaccuracy
Some webhook schemas in the 2022-11-28 description on main (c6721f3) describe the same object differently from one action to the next, or leave out a field GitHub's own examples carry. All four were the same at 3cef12e.
webhook-workflow-run-in-progress:workflow_runhas nodisplay_title, whichcompleteddeclares andrequestedrequires, andactor,triggering_actor,repository.ownerandhead_repository.ownerhave nouser_view_type, which both other actions declare. Itsconclusionisnullable: true, but the enum has nonull, so a validator that follows OAS 3.0.3 rejectsconclusion: null, which is what an in-progress run carries.requestedlistsnullin its enum.webhook-pull-request-review-thread-resolvedand-unresolveddescribe the same payload apart fromaction, but four fields are nullable only inresolved:pull_request.auto_merge.commit_title,pull_request.head.label,pull_request.head.repoandthread.comments[].original_line.head.repois null once a fork is deleted, andoriginal_linecan be null on outdated comments, sounresolvedrejects payloadsresolvedaccepts.webhook-pull-request-review-submittedhas a nullablepull_request.head.label, while-dismissedand-editeddon't. [Schema Inaccuracy] head.label and head.user can be null in pull-request schema #5562 covershead.labelbeing null inpull-request; the review actions should agree with each other.simple-check-suite, which all four check_run webhooks reach throughcheck-run-with-simple-check-suite.check_suite, has nodeployment. The description's owncheck-run-created,check-run-completedandcheck-run-rerequestedexamples carrycheck_run.check_suite.deployment.Expected
The actions of one event describe the shared objects the same way:
display_title,user_view_typeand anullconclusion onin_progress; the same nullability on both review-thread actions and on all review actions; anddeploymentonsimple-check-suite.Reproduction Steps