Skip to content

fix: use GITHUB_TOKEN instead of app token for tagging/releases#714

Merged
gustavohstrassburger merged 2 commits into
mainfrom
gustavo/fix-publish-job-token
Jun 30, 2026
Merged

fix: use GITHUB_TOKEN instead of app token for tagging/releases#714
gustavohstrassburger merged 2 commits into
mainfrom
gustavo/fix-publish-job-token

Conversation

@gustavohstrassburger

@gustavohstrassburger gustavohstrassburger commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Problem

PR #695 broke the release.

The publish job was referencing GH_APP_POSTHOG_PYTHON_RELEASER_APP_ID and GH_APP_POSTHOG_PYTHON_RELEASER_PRIVATE_KEY — secrets scoped to the Release environment — to generate a GitHub App token for creating git tags and GitHub releases. Because the publish job intentionally has no environment: 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 token step from the publish job and replace GH_TOKEN: \${{ steps.releaser.outputs.token }} with GH_TOKEN: \${{ github.token }} in the tag and release steps. The job already declares contents: write, so github.token has the permissions it needs. The app token is only required in version-bump, where it pushes commits directly to main bypassing 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.token that already has the required contents: write permission.

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Publish to changelog?

No.

@greptile-apps

greptile-apps Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Fix publish job: use GITHUB_TOKEN instea..." | Re-trigger Greptile

@gustavohstrassburger gustavohstrassburger changed the title Fix publish job: use GITHUB_TOKEN instead of app token for tagging/releases fix: use GITHUB_TOKEN instead of app token for tagging/releases Jun 30, 2026
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

posthog-python Compliance Report

Date: 2026-06-30 21:32:38 UTC
Duration: 175979ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 512ms
Format Validation.Event Has Uuid 1506ms
Format Validation.Event Has Lib Properties 1505ms
Format Validation.Distinct Id Is String 1506ms
Format Validation.Token Is Present 1506ms
Format Validation.Custom Properties Preserved 1506ms
Format Validation.Event Has Timestamp 1505ms
Retry Behavior.Retries On 503 9515ms
Retry Behavior.Does Not Retry On 400 3506ms
Retry Behavior.Does Not Retry On 401 3506ms
Retry Behavior.Respects Retry After Header 9509ms
Retry Behavior.Implements Backoff 23530ms
Retry Behavior.Retries On 500 7502ms
Retry Behavior.Retries On 502 7511ms
Retry Behavior.Retries On 504 7509ms
Retry Behavior.Max Retries Respected 23515ms
Deduplication.Generates Unique Uuids 1505ms
Deduplication.Preserves Uuid On Retry 7509ms
Deduplication.Preserves Uuid And Timestamp On Retry 14514ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 7514ms
Deduplication.No Duplicate Events In Batch 1504ms
Deduplication.Different Events Have Different Uuids 1505ms
Compression.Sends Gzip When Enabled 1506ms
Batch Format.Uses Proper Batch Structure 1505ms
Batch Format.Flush With No Events Sends Nothing 1005ms
Batch Format.Multiple Events Batched Together 1504ms
Error Handling.Does Not Retry On 403 3508ms
Error Handling.Does Not Retry On 413 3507ms
Error Handling.Retries On 408 7511ms

Feature_Flags Tests

16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 1002ms
Request Payload.Flags Request Uses V2 Query Param 1005ms
Request Payload.Flags Request Hits Flags Path Not Decide 1006ms
Request Payload.Flags Request Omits Authorization Header 1005ms
Request Payload.Token In Flags Body Matches Init 1005ms
Request Payload.Groups Round Trip 1006ms
Request Payload.Groups Default To Empty Object 1009ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It 1004ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 1006ms
Request Payload.Disable Geoip Omitted Defaults To False 1005ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 1005ms
Request Lifecycle.No Flags Request On Init Alone 503ms
Request Lifecycle.No Flags Request On Normal Capture 1505ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 1008ms
Request Lifecycle.Mock Response Value Is Returned To Caller 1002ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 1507ms

@gustavohstrassburger gustavohstrassburger marked this pull request as ready for review June 30, 2026 21:29
@gustavohstrassburger gustavohstrassburger requested a review from a team as a code owner June 30, 2026 21:29
@greptile-apps

greptile-apps Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "Add changeset for openfeature-provider-p..." | Re-trigger Greptile

@gustavohstrassburger gustavohstrassburger enabled auto-merge (squash) June 30, 2026 21:35
@gustavohstrassburger gustavohstrassburger merged commit 5dd4fc2 into main Jun 30, 2026
35 checks passed
@gustavohstrassburger gustavohstrassburger deleted the gustavo/fix-publish-job-token branch June 30, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants