diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index e59c4941..38c67baa 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -278,7 +278,7 @@ export function cleanServiceGroups(groups) { server, // docker widget container, currency, // coinmarketcap widget - creatorId, // azurePullRequests + userEmail, // azurePullRequests symbols, slugs, defaultinterval, @@ -312,7 +312,7 @@ export function cleanServiceGroups(groups) { }; if (type === "azurePullRequests") { - if (creatorId) cleanedService.widget.creatorId = creatorId; + if (userEmail) cleanedService.widget.userEmail = userEmail; } if (type === "coinmarketcap") { diff --git a/src/widgets/azurePullrequests/component.jsx b/src/widgets/azurePullrequests/component.jsx index 4f8277df..2fa3d73a 100644 --- a/src/widgets/azurePullrequests/component.jsx +++ b/src/widgets/azurePullrequests/component.jsx @@ -11,7 +11,7 @@ export default function Component({ service }) { const { data: prData, error: prError } = useWidgetAPI(widget); - const { creatorId } = widget; + const { userEmail } = widget; if (prError) { const finalError = prError ; @@ -31,8 +31,9 @@ export default function Component({ service }) { return ( - item.creatorId===creatorId).length })} /> - item.reviewers.some(reviewer => reviewer.vote === 10)).length })} /> + item.createdBy.uniqueName===userEmail).length })} /> + item.createdBy.uniqueName===userEmail).filter(item => item.reviewers.some(reviewer => reviewer.vote === 10)).length })} /> + ); }