Skip to content

fix(ci): attribute release tag to GitHub App#460

Merged
Piccirello merged 2 commits intomasterfrom
tom/release-tag
Mar 10, 2026
Merged

fix(ci): attribute release tag to GitHub App#460
Piccirello merged 2 commits intomasterfrom
tom/release-tag

Conversation

@Piccirello
Copy link
Member

Releases are still attributed to github-actions, but this change should result in future releases being attributed to releaser-posthog-python.

Example: https://github.com/PostHog/posthog-python/releases/tag/v7.9.9

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 10, 2026

Comments Outside Diff (1)

  1. .github/workflows/release.yml, line 197-202 (link)

    Create GitHub Release step still uses the default actions token

    The "Tag release" step was updated to use steps.releaser.outputs.token (the releaser GitHub App token), which will correctly attribute the annotated tag object to releaser-posthog-python. However, the "Create GitHub Release" step still uses secrets.GITHUB_TOKEN — the default github-actions app token.

    On GitHub's releases page, the "Released by" attribution is determined by the actor that calls the create-release API endpoint (i.e. whoever authenticates gh release create). With the default actions token still in use here, the release page will continue showing github-actions as the author rather than releaser-posthog-python.

    If the intent is to have the full release attributed to releaser-posthog-python, this step should also use steps.releaser.outputs.token as GH_TOKEN instead of the default token.

Last reviewed commit: 769ba17

Comment on lines 184 to +195
NEW_VERSION: ${{ steps.sampo-release.outputs.new_version }}
COMMIT_HASH: ${{ steps.commit-release.outputs.commit-hash }}
run: |
TAG_SHA=$(gh api "repos/${{ github.repository }}/git/tags" \
-f "tag=v${NEW_VERSION}" \
-f "message=Release v${NEW_VERSION}" \
-f "object=${COMMIT_HASH}" \
-f "type=commit" \
-q '.sha')
gh api "repos/${{ github.repository }}/git/refs" \
-f "ref=refs/tags/v$NEW_VERSION" \
-f "sha=$COMMIT_HASH"
-f "ref=refs/tags/v${NEW_VERSION}" \
-f "sha=${TAG_SHA}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Re: lines +177 to +195]

Should probably be turned into a shared action if this works! This is a bit cryptic

See this comment inline on Graphite.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was reverted in #461

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

posthog-python Compliance Report

Date: 2026-03-10 21:21:14 UTC
Duration: 159357ms

✅ All Tests Passed!

29/29 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 516ms
Format Validation.Event Has Uuid 1506ms
Format Validation.Event Has Lib Properties 1505ms
Format Validation.Distinct Id Is String 1507ms
Format Validation.Token Is Present 1506ms
Format Validation.Custom Properties Preserved 1506ms
Format Validation.Event Has Timestamp 1506ms
Retry Behavior.Retries On 503 9516ms
Retry Behavior.Does Not Retry On 400 3506ms
Retry Behavior.Does Not Retry On 401 3508ms
Retry Behavior.Respects Retry After Header 9513ms
Retry Behavior.Implements Backoff 23528ms
Retry Behavior.Retries On 500 7501ms
Retry Behavior.Retries On 502 7511ms
Retry Behavior.Retries On 504 7517ms
Retry Behavior.Max Retries Respected 23517ms
Deduplication.Generates Unique Uuids 1508ms
Deduplication.Preserves Uuid On Retry 7510ms
Deduplication.Preserves Uuid And Timestamp On Retry 14525ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 7507ms
Deduplication.No Duplicate Events In Batch 1503ms
Deduplication.Different Events Have Different Uuids 1506ms
Compression.Sends Gzip When Enabled 1507ms
Batch Format.Uses Proper Batch Structure 1506ms
Batch Format.Flush With No Events Sends Nothing 1004ms
Batch Format.Multiple Events Batched Together 1505ms
Error Handling.Does Not Retry On 403 3508ms
Error Handling.Does Not Retry On 413 3507ms
Error Handling.Retries On 408 7514ms

@Piccirello Piccirello merged commit b48a7ac into master Mar 10, 2026
24 checks passed
@Piccirello Piccirello deleted the tom/release-tag branch March 10, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants