ci: trigger Python client model regeneration on OpenAPI spec changes#2381
ci: trigger Python client model regeneration on OpenAPI spec changes#2381
Conversation
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d2e8105 to
28fb323
Compare
|
Preview for this PR was built for commit |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Preview for this PR was built for commit |
There was a problem hiding this comment.
Pull request overview
Adds automation to keep apify-client-python’s generated Pydantic models in sync by triggering regeneration when this repo’s OpenAPI specs change, and cleans up the generated client PR when the originating docs PR is closed.
Changes:
- Extend the OpenAPI CI workflow to run on
pull_requestclosedevents (for cleanup). - Add a job to detect OpenAPI spec changes in PRs and trigger the downstream
apify-client-pythonregeneration workflow. - Add a cleanup job to close/delete the corresponding auto-generated
apify-client-pythonPR/branch when the docs PR closes.
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
## Summary - Add `workflow_dispatch` workflow that regenerates Pydantic models from an `apify-docs` PR's OpenAPI spec - Builds the spec locally, runs `datamodel-codegen`, and opens a PR if models changed - Comments back on the source `apify-docs` PR with a link ## Issues - Closes: #618 ## Context - apify/apify-docs#2381 - #694 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
apify-client-pythonwhen OpenAPI spec files change in a PRIssues
Context