Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zzzeid
Copy link
Collaborator

@zzzeid zzzeid commented Jan 17, 2025

  • 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

@zzzeid zzzeid force-pushed the zeid/bug-1941342-diff_warnings branch 4 times, most recently from 43d9e53 to e45d7fa Compare January 20, 2025 18:56
@zzzeid zzzeid force-pushed the zeid/bug-1941342-diff_warnings branch from e45d7fa to 54a203d Compare January 20, 2025 18:58
@zzzeid zzzeid requested review from shtrom and cgsheeh and removed request for shtrom January 20, 2025 19:00
@zzzeid zzzeid marked this pull request as ready for review January 20, 2025 19:02
Copy link
Member

@shtrom shtrom left a 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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +87 to +88
else:
return JsonResponse({"errors": dict(form.errors)}, status=400)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else:
return JsonResponse({"errors": dict(form.errors)}, status=400)
return JsonResponse({"errors": dict(form.errors)}, status=400)

Comment on lines +110 to +111
else:
return JsonResponse({"errors": dict(form.errors)}, status=400)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else:
return JsonResponse({"errors": dict(form.errors)}, status=400)
return JsonResponse({"errors": dict(form.errors)}, status=400)

Comment on lines -149 to 154
"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,
Copy link
Member

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 (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants