homepage/src/widgets/azuredevops/widget.js
Nitzan Miranda 7e05adc02a
Add Azure DevOps (#1715)
* add azure pullrequrests

* add creatorId

* rename azurePullrequests->azurePullRequests

* pass creatorId to FE

* expose userEmail to frontend

* tolower

* remove unused code

* merge to AzureDevOps

* fix userEmail

* remove whitespace in const and set true endpoint in widget

* use widget params in endpoint

* change approvedNotCompleted to Approved

* change to lower

* rename

* rename

* merge widgets together

* limit pipeline result to 1 result

* Better handle azuredevops PR call failures

* change to have repositoryId and not branchName

* Fix field filtering, avoid PR call if not needed

---------

Co-authored-by: Nitzan Miranda <Nitzan.Miranda@bagirasys.com>
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2023-07-29 22:17:30 -07:00

19 lines
452 B
JavaScript

import credentialedProxyHandler from "utils/proxy/handlers/credentialed";
const widget = {
api: "https://dev.azure.com/{organization}/{project}/_apis/{endpoint}",
proxyHandler: credentialedProxyHandler,
mappings: {
pr: {
endpoint: "git/repositories/{repositoryId}/pullrequests"
},
pipeline: {
endpoint: "build/Builds?branchName={branchName}&definitions={definitionId}&$top=1"
},
},
};
export default widget;