python-jsonschema / check-jsonschema

A CLI and set of pre-commit hooks for jsonschema validation with built-in support for GitHub Workflows, Renovate, Azure Pipelines, and more!
https://check-jsonschema.readthedocs.io/en/stable
Other
191 stars 39 forks source link

Update vendored schemas #409

Closed hugovk closed 3 months ago

hugovk commented 3 months ago

Updated by running ./scripts/vendor-schemas.py, motivation is to support merge queues in GitHub Actions workflows:

-on: [push, pull_request, workflow_dispatch]
+on: [push, pull_request, workflow_dispatch, merge_group]

https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue

Validate GitHub Workflows................................................Failed
- hook id: check-github-workflows
- exit code: 1

ok -- validation done
Schema validation errors were encountered.
  .github/workflows/test.yml::$.on: ['push', 'pull_request', 'workflow_dispatch', 'merge_group'] is not valid under any of the given schemas
  Underlying errors caused this.

  Best Match:
    $.on: ['push', 'pull_request', 'workflow_dispatch', 'merge_group'] is not of type 'string'
  Best Deep Match:
    $.on[3]: 'merge_group' is not one of ['branch_protection_rule', 'check_run', 'check_suite', 'create', 'delete', 'deployment', 'deployment_status', 'discussion', 'discussion_comment', 'fork', 'gollum', 'issue_comment', 'issues', 'label', 'member', 'milestone', 'page_build', 'project', 'project_card', 'project_column', 'public', 'pull_request', 'pull_request_review', 'pull_request_review_comment', 'pull_request_target', 'push', 'registry_package', 'release', 'status', 'watch', 'workflow_call', 'workflow_dispatch', 'workflow_run', 'repository_dispatch']

  2 other errors were produced. Use '--verbose' to see all errors.
sirosen commented 3 months ago

Thanks for giving me a nudge on this, and taking the initiative to run the update! I try to stay on top of releases to ship out new schemas regularly, but my schedule has been a bit bananas and I haven't done one in -- checks release history -- quite a while.

I'll get this shipped out and you should be able to start using the new schema right away. Please always feel free to drop by and request an update if there's something you need!

hugovk commented 3 months ago

Thank you!

It probably wouldn't be too hard to set up a cron to run the handy update script and create a PR once a month or so.

edgarrmondragon commented 3 months ago

Thank you!

It probably wouldn't be too hard to set up a cron to run the handy update script and create a PR once a month or so.

Like https://github.com/python-jsonschema/check-jsonschema/pull/398? 😅

sirosen commented 3 months ago

Yeah, I did the hard part to get it wired up and then it has become noise for me because it's going off constantly and I learned to tune it out! :sweat_smile:

I need to crank it back from daily to weekly. In terms of the eternal problems I, like many people, have managing workload and attention, that will provide a better signal that I really ought to stop by and do a release.

hugovk commented 3 months ago

Please see PR https://github.com/python-jsonschema/check-jsonschema/pull/412 to switch to weekly.