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>
This commit is contained in:
Nitzan Miranda 2023-08-09 10:05:34 +03:00 committed by GitHub
parent 5611baa0b8
commit 12736cc003
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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
})}
/>}

View file

@ -10,7 +10,7 @@ const widget = {
},
pipeline: {
endpoint: "build/Builds?branchName={branchName}&definitions={definitionId}&$top=1"
endpoint: "build/Builds?branchName={branchName}&definitions={definitionId}"
},
},
};