From 12736cc0036ae121663145aec3216449db41b37e Mon Sep 17 00:00:00 2001 From: Nitzan Miranda <59150911+Nizzan943@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:05:34 +0300 Subject: [PATCH] Fix(AzureDevOps): PR approved count and Pipeline running status (#1788) * fix pr-votes for approved with suggestions counts * remove top1 result top1 result prevent from running pipeline to show in request * Update src/widgets/azuredevops/component.jsx Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- src/widgets/azuredevops/component.jsx | 2 +- src/widgets/azuredevops/widget.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/azuredevops/component.jsx b/src/widgets/azuredevops/component.jsx index a9db44033..27c39d1ce 100644 --- a/src/widgets/azuredevops/component.jsx +++ b/src/widgets/azuredevops/component.jsx @@ -56,7 +56,7 @@ export default function Component({ service }) { value={t("common.number", { value: prData.value ?.filter((item) => item.createdBy.uniqueName.toLowerCase() === userEmail.toLowerCase()) - .filter((item) => item.reviewers.some((reviewer) => reviewer.vote === 10)).length, + .filter((item) => item.reviewers.some((reviewer) => [5,10].includes(reviewer.vote))).length })} />} diff --git a/src/widgets/azuredevops/widget.js b/src/widgets/azuredevops/widget.js index 84c9fdf35..080f9cc44 100644 --- a/src/widgets/azuredevops/widget.js +++ b/src/widgets/azuredevops/widget.js @@ -10,7 +10,7 @@ const widget = { }, pipeline: { - endpoint: "build/Builds?branchName={branchName}&definitions={definitionId}&$top=1" + endpoint: "build/Builds?branchName={branchName}&definitions={definitionId}" }, }, };