Log the repository name when pushing and pulling.
This commit is contained in:
parent
8615e9236b
commit
5a45f50583
1 changed files with 11 additions and 3 deletions
|
@ -157,10 +157,15 @@ def create_repository(namespace, repository):
|
||||||
|
|
||||||
response = make_response('Created', 201)
|
response = make_response('Created', 201)
|
||||||
|
|
||||||
|
extra_params = {
|
||||||
|
'repository': '%s/%s' % (namespace, repository),
|
||||||
|
}
|
||||||
|
|
||||||
if get_authenticated_user():
|
if get_authenticated_user():
|
||||||
mixpanel.track(get_authenticated_user().username, 'push_repo')
|
mixpanel.track(get_authenticated_user().username, 'push_repo',
|
||||||
|
extra_params)
|
||||||
else:
|
else:
|
||||||
mixpanel.track(get_validated_token().code, 'push_repo')
|
mixpanel.track(get_validated_token().code, 'push_repo', extra_params)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
@ -220,7 +225,10 @@ def get_repository_images(namespace, repository):
|
||||||
if get_authenticated_user():
|
if get_authenticated_user():
|
||||||
pull_username = get_authenticated_user().username
|
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
|
return resp
|
||||||
|
|
||||||
|
|
Reference in a new issue