Skip to content

Update Packagist with GitHub webhooks without Service

In April this year GitHub announced that it would deprecate the GitHub Service feature, which currently is the recommended way to setup a Packagist package with GitHub. Don’t worry, you still have plenty of time… GitHub is not going to discontinue this feature till the beginning of 2019, but if you’re currently setting up GitHub with packagist, then you might want to do it already the new way.

The official Packagist documentation lacks instructions on how to setup automatic updating of Packagist using GitHub WebHooks. Here’s how you do it:

1. Go to your GitHub repository and select  Settings -> WebHooks

2. As the PayLoad URL type in

Replace XYZ with your API Token, see your Packagist profile for your API token.

3. Content-Type needs to be application/json

4. Insert the following into secret, this is the actual JSON payload:

Don’t forget to replace PACKAGIST_PACKAGE_URL  with the URL of your package e.g. https://packagist.org/packages/user/some-package

5.Now you can select which events should trigger the actual push to Packagist.

6. You’re done, this is how it should look like:

Published inUncategorized

Be First to Comment

Leave a Reply

Your email address will not be published.