-
Notifications
You must be signed in to change notification settings - Fork 526
fix(entity-feedback): Add link to feedback notifications #6611
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
Changes from 3 commits
fe105e7
92b7cd7
8673378
a6d6143
8875224
bb144b6
c7a27cf
fd04afb
51b5aea
178f1ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@backstage-community/plugin-entity-feedback-backend': patch | ||
| --- | ||
|
|
||
| Add clickable link to feedback notifications. When entity owners receive notifications about new feedback, the notification now includes a link to navigate directly to the entity's feedback page. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -227,9 +227,16 @@ export async function createRouter( | |
| type: 'entity', | ||
| entityRef: entityOwner, | ||
| }; | ||
|
|
||
| // Construct entity URL from entityRef (format: "kind:namespace/name") | ||
| const [kind, namespaceName] = req.params.entityRef.split(':'); | ||
| const [namespace, name] = namespaceName.split('/'); | ||
| const entityUrl = `/catalog/${namespace}/${kind}/${name}/feedback`; | ||
|
||
|
|
||
| const payload: NotificationPayload = { | ||
| title: `New feedback for ${req.params.entityRef}`, | ||
| description: `Comments: ${JSON.parse(comments).additionalComments}`, | ||
| link: entityUrl, | ||
| }; | ||
| await notificationService.send({ | ||
| recipients, | ||
|
|
||
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.
FYI you can use
parseEntityRefto parse entity refs