composer/packagist — pull request #84 by simensen (2012-02-11 14:11:11+00:00)
Title: Added GitHub Post-Receive URL feature.

This should resolve both #81 and #67. Sorta related to #58.

* User now has an apiToken field
* apiToken is generated when the User is created
* apiToken and GitHub Post-Receive URL is displayed on the user's profile page
* There is a `packagist:tokens:generate` command to generate tokens

Once in place, it should look like this:

![profile page with apiToken](http://content.screencast.com/users/beausimensen/folders/Jing/media/f8e04710-ba17-4e9e-852b-f2a009bf69cd/00000168.png)

## Upgrade

php app/console doctrine:schema:update
php app/console packagist:tokens:generate

Currently, `packagist:tokens:generate` is pretty basic and just regenerates tokens for users who are currently missing a token. This is useful for upgrading to support tokens (just needs to be run once). Eventually this command can be updated to have a few options:

* `--missing` generate tokens for any user missing a token
* `--for-user` regenerate a token for a specific user

## TODO

I had to copy a lot of functionality from `UpdatePackagesCommand`. This should eventually (sooner rather than later?) be refactored and extracted into its own class so that it can be better reused and tested.