Add tracking of the kind of temporary access tokens, so we can display if a pull/push by token is for a build worker
This commit is contained in:
parent
3e04e3cfd7
commit
83e05d2342
10 changed files with 88 additions and 14 deletions
|
@ -34,6 +34,10 @@ def track_and_log(event_name, repo, **kwargs):
|
|||
elif authenticated_token:
|
||||
metadata['token'] = authenticated_token.friendly_name
|
||||
metadata['token_code'] = authenticated_token.code
|
||||
|
||||
if authenticated_token.kind:
|
||||
metadata['token_type'] = authenticated_token.kind.name
|
||||
|
||||
analytics_id = 'token:' + authenticated_token.code
|
||||
else:
|
||||
metadata['public'] = True
|
||||
|
|
Reference in a new issue