Repository navigation
chore: notify Packagist from the release job instead of a webhook - #92
Merged
Merged
Conversation
Call Packagist's update-package API as the shared 'mixpanel' account at the end of release-packagist.yml, after approval and tests, using the PACKAGIST_HOOK_TOKEN secret on the release environment. Replaces the GitHub webhook that authenticated with a former employee's token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] This change appears safe to merge; no actionable issues were found. Reviews (1) · Last reviewed commit: "chore: notify Packagist from the release..." · Reviewed by Greptile |
rahul-mixpanel
approved these changes
Nov 17, 2026
rahul-mixpanel
left a comment
There was a problem hiding this comment.
LGTM. I checked that mixpanel is the only maintainer of mixpanel/mixpanel-php on Packagist and that the URL Packagist has registered matches REPO_URL exactly, so the call should succeed once PACKAGIST_HOOK_TOKEN is set on the release environment. Two optional nits inline.
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
Replace the GitHub → Packagist webhook with an explicit Packagist update at the end of the release job.
release-packagist.yml, after tests pass and the draft GitHub release is created. It calls Packagist's documentedupdate-packageAPI (packagist.org/about, "Manual hook setup") as the sharedmixpanelPackagist account, using thePACKAGIST_HOOK_TOKENsecret on thereleaseenvironment (Packagist's safe API token, which can only trigger package updates).Why
https://packagist.org/api/github?username=jbwyme, created 2020) authenticates with a former employee's personal Packagist token, so it is likely broken or about to be. Without any hook, Packagist only crawls the package about once a week.releasereviewer approves and PHPUnit passes, instead of seconds after the tag push. The token lives only in the gatedreleaseenvironment.Not a hard gate: Packagist reads versions from git tags and still crawls weekly, so a pushed tag will eventually be indexed even if the job is never approved. The real control over what becomes a release is the tag ruleset (only sdk-maintainers can push
[0-9]*tags).After merge
?username=jbwyme) under Settings → Webhooks.Test plan
Missing or invalid username/apiToken→ the step fails as intended.🤖 Generated with Claude Code