ci: Repair regenerate-models workflow stale add glob#809
Merged
Conversation
The `add:` pathspec `_*_generated.py` stopped matching anything after the generated files were renamed (PR #765 dropped the `_generated` suffix), so the workflow has been silently producing no commits since 2026-04-29. After PR #792 swapped to `apify/actions/signed-commit`, the pre-existing local `git switch -c "$BRANCH"` step also clashed with the action's `create-branch: true` flow (its `git fetch ... $BRANCH:refs/heads/$BRANCH` refuses to overwrite a checked-out branch), leaving dangling empty branches like `update-models-docs-pr-2546` / `-2548`. This fixes the `add:` list to the actual filenames and skips the local branch creation when the remote branch doesn't yet exist, letting signed-commit handle that path; existing branches are still pre-checked-out locally and `create-branch` is set to `false` for that case.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #809 +/- ##
==========================================
+ Coverage 94.52% 94.54% +0.02%
==========================================
Files 48 48
Lines 4916 4916
==========================================
+ Hits 4647 4648 +1
+ Misses 269 268 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
janbuchar
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug in
.github/workflows/manual_regenerate_models.yamlthat's been silently breaking model regeneration since 2026-04-29.Bug — stale
add:globadd: 'src/apify_client/_*_generated.py'matches nothing. PR #765 renamed the generated files from_models_generated.py/_typeddicts_generated.pyto_models.py,_typeddicts.py,_literals.py, but the workflow's pathspec and header comment weren't updated. Underapify/actions/signed-commit@v1.0.0this producescommitted: falsewith no error — so the workflow has been exiting green while doing nothing for ~3 weeks.Changes
_{models,typeddicts}_generated.py→_{models,typeddicts,literals}.py.add:enumerates the actually-generated files.Follow-up
A separate bug in the workflow —
create-branch: 'true'colliding with the localgit switch -c "$BRANCH"in the new-branch path, causingapify/actions/signed-committo fail withfatal: refusing to fetch into branch ... checked out at ...— also leaves dangling remote branches without PRs (e.g.update-models-docs-pr-2546,update-models-docs-pr-2548). Will be addressed in a follow-up PR.