Set the release version in the repo instead of in CI - #48
Merged
Conversation
The publish workflow bumped the version and pushed the commit to main, which the tier-1-repos ruleset blocks without a PAT. It also ran generate.sh to embed the new version in the client, but openapi-generator is not installed on the runner and generate.sh had no set -e, so that step silently did nothing. 4.3.0 and 4.4.0 shipped with __version__ = "4.2.0" and a matching stale user-agent. The version now comes from pyproject.toml on main, set by the same PR that regenerates the client, where the generator is actually installed. generate.sh takes an optional major/minor/patch argument (defaulting to minor) and bumps before generating. Publish only tests, builds, publishes, and releases the commit it checked out, all of which GITHUB_TOKEN can do, so GH_API_TOKEN can be deleted from repo secrets.
bradymholt
marked this pull request as ready for review
August 19, 2026 22:37
The script wrapped generate.sh with branch, commit, push, and PR creation, but never used generate.sh's version bump: it called it with "none" and bumped separately, leaving two entry points with different semantics. Regenerating and opening the PR is straightforward enough by hand that the wrapper was not worth maintaining alongside it.
bradymholt
requested review from
a team and
eebs
and removed request for
a team
August 19, 2026 22:45
eebs
approved these changes
Aug 20, 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.
The publish GitHub Actions workflow previously bumped the version and pushed the commit to
main, which thetier-1-reposruleset blocks without a PAT. It also regenerated the client in CI to embed the new version, butopenapi-generatorisn't on the runner andgenerate.shhad noset -e, so that step silently did nothing: 4.3.0 and 4.4.0 shipped with__version__ = "4.2.0".The version now comes from
pyproject.tomlonmain, set by the same PR that regenerates the client, where the generator is actually installed.scripts/generate.shtakes an optional major/minor/patch argument (defaulting to minor) and bumps before generating. Publish only tests, builds, publishes, and releases the commit it checked out, all of whichGITHUB_TOKENcan do, soGH_API_TOKENcan be deleted from repo secrets.I also removed
scripts/generate-and-pr.sh, which wrappedgenerate.shbut never used its version bump.Same change as ynab/ynab-sdk-js#232.