SIGN IN SIGN UP

ci: regenerate models against current master to avoid duplicate PRs (#861)

The `Regenerate models` workflow opened
[#860](https://github.com/apify/apify-client-python/pull/860),
duplicating webhook fields already merged via
[#855](https://github.com/apify/apify-client-python/pull/855). The **Set
up branch** step regenerated on top of a stale
`update-models-docs-pr-<N>` branch (based on a pre-#855 `master`), so an
already-merged change reappeared as a fresh diff.

Fix: always regenerate against the current `master`.

- **Check for model changes** compares the regenerated files against
`master` and skips when there is no diff, so an already-merged change
can no longer produce a duplicate PR.
- When there is a diff, the branch is force-pointed at `master` and
`signed-commit` adds one regenerated commit on top. The PR still updates
whenever the source docs PR gets new commits.

Trade-off: the branch is always a single regenerated commit on top of
`master`, so any commits pushed onto it directly are replaced on the
next run. This is the intended, idempotent behavior for an
auto-generated branch.
V
Vlada Dusek committed
be7bba0ecb444cf8461b71f446e58e30840203f4
Parent: c9594fc
Committed by GitHub <noreply@github.com> on 6/17/2026, 4:01:39 PM