Skip to content

ci: add workflow to regenerate models from OpenAPI spec#694

Open
vdusek wants to merge 5 commits intomasterfrom
ci/regenerate-models-workflow
Open

ci: add workflow to regenerate models from OpenAPI spec#694
vdusek wants to merge 5 commits intomasterfrom
ci/regenerate-models-workflow

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented Mar 31, 2026

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

Context

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Mar 31, 2026
@vdusek vdusek self-assigned this Mar 31, 2026
@github-actions github-actions bot added this to the 137th sprint - Tooling team milestone Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.68%. Comparing base (b778c20) to head (bdfe4bf).
⚠️ Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #694      +/-   ##
==========================================
- Coverage   94.80%   94.68%   -0.12%     
==========================================
  Files          45       45              
  Lines        4404     4403       -1     
==========================================
- Hits         4175     4169       -6     
- Misses        229      234       +5     
Flag Coverage Δ
integration 94.68% <ø> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a manually triggered GitHub Actions workflow to regenerate this repo’s generated Pydantic models from an OpenAPI spec produced in an apify/apify-docs PR, and open/update a PR with the updated src/apify_client/_models.py.

Changes:

  • Introduces a workflow_dispatch workflow that checks out apify/apify-docs at a provided commit SHA and builds the bundled OpenAPI JSON.
  • Runs model generation via datamodel-codegen, detects changes, and creates/updates a PR in this repo.
  • Posts a cross-repo comment back to the originating apify-docs PR with the created/updated PR link (and a failure comment on error).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate PR creation when OpenAPI spec is updated

4 participants