-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
diff_warnings: port functionality (bug 1941342) #197
base: main
Are you sure you want to change the base?
Conversation
zzzeid
commented
Jan 17, 2025
•
edited
Loading
edited
- port diff warnings endpoint handling
- unskip tests
- update tests, views, forms to work with new implementation
- rename diff_warning.error_breakdown back to diff_warning.data
43d9e53
to
e45d7fa
Compare
e45d7fa
to
54a203d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of non-functional suggestions, and one question about the HTTP_X_Phabricator_API_Key
header, but LGTM otherwise.
If the question is irrelevant, then I think it's good to merge.
|
||
@wraps(func) | ||
def _wrapper(self, request, *args, **kwargs): | ||
HEADER = "X-Phabricator-Api-Key" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be HTTP_X_Phabricator_API_Key
now, as in the test fixtures? https://github.com/mozilla-conduit/lando/pull/197/files#diff-3f084e2a5f612fc35bc5c68a611d1ad8959f632315c6e9115149298061dcc371R15
else: | ||
return JsonResponse({"errors": dict(form.errors)}, status=400) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else: | |
return JsonResponse({"errors": dict(form.errors)}, status=400) | |
return JsonResponse({"errors": dict(form.errors)}, status=400) |
else: | ||
return JsonResponse({"errors": dict(form.errors)}, status=400) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else: | |
return JsonResponse({"errors": dict(form.errors)}, status=400) | |
return JsonResponse({"errors": dict(form.errors)}, status=400) |
"id": self.id, | ||
"diff_id": self.diff_id, | ||
"group": self.group, | ||
"id": self.id, | ||
"revision_id": self.revision_id, | ||
"status": self.status.value, | ||
"group": self.group.value, | ||
"status": self.status, | ||
"data": self.data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we could sort that (: