Log the repository name when pushing and pulling.

This commit is contained in:
yackob03 2013-11-14 14:53:55 -05:00
parent 8615e9236b
commit 5a45f50583

View file

@ -157,10 +157,15 @@ def create_repository(namespace, repository):
response = make_response('Created', 201)
extra_params = {
'repository': '%s/%s' % (namespace, repository),
}
if get_authenticated_user():
mixpanel.track(get_authenticated_user().username, 'push_repo')
mixpanel.track(get_authenticated_user().username, 'push_repo',
extra_params)
else:
mixpanel.track(get_validated_token().code, 'push_repo')
mixpanel.track(get_validated_token().code, 'push_repo', extra_params)
return response
@ -220,7 +225,10 @@ def get_repository_images(namespace, repository):
if get_authenticated_user():
pull_username = get_authenticated_user().username
mixpanel.track(pull_username, 'pull_repo')
extra_params = {
'repository': '%s/%s' % (namespace, repository),
}
mixpanel.track(pull_username, 'pull_repo', extra_params)
return resp