|
39 | 39 | log = logging.getLogger(__name__) |
40 | 40 |
|
41 | 41 |
|
42 | | -def create_upload(serializer, repository, commit, report, is_shelter_request, analytics_token): |
| 42 | +def create_upload( |
| 43 | + serializer, repository, commit, report, is_shelter_request, analytics_token |
| 44 | +): |
43 | 45 | version = ( |
44 | 46 | serializer.validated_data["version"] |
45 | 47 | if "version" in serializer.validated_data |
@@ -126,7 +128,9 @@ def activate_repo(repository): |
126 | 128 | ) |
127 | 129 |
|
128 | 130 |
|
129 | | -def send_analytics_data(commit: Commit, upload: ReportSession, version, analytics_token): |
| 131 | +def send_analytics_data( |
| 132 | + commit: Commit, upload: ReportSession, version, analytics_token |
| 133 | +): |
130 | 134 | analytics_upload_data = { |
131 | 135 | "commit": commit.commitid, |
132 | 136 | "branch": commit.branch, |
@@ -156,7 +160,9 @@ def get_token_for_analytics(commit: Commit, request): |
156 | 160 | if isinstance(request.auth, TokenlessAuth): |
157 | 161 | analytics_token = "tokenless_upload" |
158 | 162 | elif isinstance(request.auth, OrgLevelTokenRepositoryAuth): |
159 | | - analytics_token = OrganizationLevelToken.objects.filter(owner=repo.author).first().token |
| 163 | + analytics_token = ( |
| 164 | + OrganizationLevelToken.objects.filter(owner=repo.author).first().token |
| 165 | + ) |
160 | 166 | elif isinstance(request.auth, OIDCTokenRepositoryAuth): |
161 | 167 | analytics_token = "oidc_token_upload" |
162 | 168 | else: |
|
0 commit comments