Skip to content
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

[Schema Inaccuracy] <wrong spec in webhook-workflow-job-completed -> workflow_job -> allOf[1]> #2971

Open
windqin opened this issue Sep 8, 2023 · 0 comments

Comments

@windqin
Copy link

windqin commented Sep 8, 2023

Schema Inaccuracy

In https://github.com/github/rest-api-description/blob/main/descriptions/ghec/ghec.2022-11-28.json head revision commit 35b5cecdbe953ee7bedce405a786d108ccf6af03, the definition of webhook-workflow-job-completed -> workflow_job -> allOf[1] is nearly the same as allOf[0], but the steps definition under it is wrong:

                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "nullable": true
                    }
                  },

And the required field in allOf[1]:

                "required": [
                  "conclusion"
                ]

Looks not very make sense.

What's the purpose of define allOf[1]?

Expected

Not use allOf for webhook-workflow-job-completed -> workflow_job, but just let webhook-workflow-job-completed -> workflow_job equals the definition of webhook-workflow-job-completed -> workflow_job -> allOf[0]

Reproduction Steps

In GHEC repo settings -> Webhooks -> Manage webhook, setup a webhook with "Workflow jobs" selected, run a workflow, then check the "Recent Deliveries" in the webhook setting page, you can see the webhook event workflow_job.completed payload the "workflow_job" field matches the spec webhook-workflow-job-completed -> workflow_job -> allOf[0]

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

3 participants