Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Creating Github Webhook For Packagist

First, get your API key by going to your profile page and clicking the big green Show API Token button.

Go to your Github project's settings for webhooks. E.g:

https://github.com/github-username/my-repo-name/settings/hooks

Click the button for adding a webhook.

Fill in the Payload URL field with your packagist (not Github) username and the API token we just grabbed like below

https://packagist.org/api/update-package?username=[USERNAME]

For the content type be sure to change it to application/json, rather than form data.

In the secret field, put just your API token secret from packagist.

References