-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(issues): structured issue annotations #74648
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #74648 +/- ##
==========================================
+ Coverage 73.62% 78.16% +4.53%
==========================================
Files 6722 6723 +1
Lines 299893 299908 +15
Branches 51597 51587 -10
==========================================
+ Hits 220797 234411 +13614
+ Misses 72356 59178 -13178
+ Partials 6740 6319 -421
|
@@ -145,7 +145,7 @@ class BaseGroupSerializerResponse(BaseGroupResponseOptional): | |||
isSubscribed: bool | |||
subscriptionDetails: GroupSubscriptionResponseOptional | None | |||
hasSeen: bool | |||
annotations: Sequence[str] | |||
annotations: dict[str, str] |
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.
We should create another TypedDict (similar to GroupProjectResponse
and others at the top of the file) and type this as Sequence[Annotation]
@@ -348,7 +348,7 @@ def map_external_issues_to_annotations(self, external_issues): | |||
for ei in external_issues: | |||
link = self.get_issue_url(ei.key) | |||
label = self.get_issue_display_name(ei) or ei.key | |||
annotations.append(f'<a href="{link}">{label}</a>') | |||
annotations.append({"url": link, "display_name": label}) |
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.
Already mentioned, but since we changed this to displayName
in the frontend we need to change it here as well
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.
🚀
@@ -348,7 +348,7 @@ def map_external_issues_to_annotations(self, external_issues): | |||
for ei in external_issues: | |||
link = self.get_issue_url(ei.key) | |||
label = self.get_issue_display_name(ei) or ei.key | |||
annotations.append(f'<a href="{link}">{label}</a>') | |||
annotations.append({"url": link, "displayName": label}) |
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.
I see no more usage of a href
in the APIs 👍🏻
No description provided.