fix: use GITHUB_TOKEN instead of app token for tagging/releases#714
Merged
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "Fix publish job: use GITHUB_TOKEN instea..." | Re-trigger Greptile |
Contributor
posthog-python Compliance ReportDate: 2026-06-30 21:32:38 UTC ✅ All Tests Passed!45/45 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 16/16 tests passed View Details
|
Contributor
|
Reviews (2): Last reviewed commit: "Add changeset for openfeature-provider-p..." | Re-trigger Greptile |
turnipdabeets
approved these changes
Jun 30, 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.
Problem
PR #695 broke the release.
The
publishjob was referencingGH_APP_POSTHOG_PYTHON_RELEASER_APP_IDandGH_APP_POSTHOG_PYTHON_RELEASER_PRIVATE_KEY— secrets scoped to theReleaseenvironment — to generate a GitHub App token for creating git tags and GitHub releases. Because thepublishjob intentionally has noenvironment:set (to avoid multiplying the approval gate across each matrix item), those secrets are unavailable and the job fails immediately.Changes
Drop the
Get GitHub App tokenstep from thepublishjob and replaceGH_TOKEN: \${{ steps.releaser.outputs.token }}withGH_TOKEN: \${{ github.token }}in the tag and release steps. The job already declarescontents: write, sogithub.tokenhas the permissions it needs. The app token is only required inversion-bump, where it pushes commits directly tomainbypassing branch protection.How did you test this code?
No automated tests — this is a CI workflow change. The fix is straightforward: removing the app-token step and using the built-in
github.tokenthat already has the requiredcontents: writepermission.👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Publish to changelog?
No.