remove whitespace in const and set true endpoint in widget
This commit is contained in:
parent
da3597a04d
commit
0ea5d47fff
@ -6,13 +6,12 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
|
|||||||
|
|
||||||
export default function Component({ service }) {
|
export default function Component({ service }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const { widget } = service;
|
const { widget } = service;
|
||||||
const { azureType } = widget;
|
const { azureType } = widget;
|
||||||
const { userEmail } = widget;
|
const { userEmail } = widget;
|
||||||
const { data: pipelineData, error: pipelineError } = useWidgetAPI(widget, "pipeline");
|
const { data: pipelineData, error: pipelineError } = useWidgetAPI(widget, "pipeline");
|
||||||
const { data: prData, error: prError } = useWidgetAPI(widget, "pr");
|
const { data: prData, error: prError } = useWidgetAPI(widget, "pr");
|
||||||
|
|
||||||
if (azureType === "Pipeline") {
|
if (azureType === "Pipeline") {
|
||||||
if (pipelineError) {
|
if (pipelineError) {
|
||||||
return <Container service={service} error={pipelineError} />;
|
return <Container service={service} error={pipelineError} />;
|
||||||
|
|||||||
@ -6,11 +6,11 @@ const widget = {
|
|||||||
|
|
||||||
mappings: {
|
mappings: {
|
||||||
pr: {
|
pr: {
|
||||||
endpoint: "git/repositories/BackEnd/pullrequests",
|
endpoint: "git/repositories/{repositoryId}/pullrequests"
|
||||||
},
|
},
|
||||||
|
|
||||||
pipeline: {
|
pipeline: {
|
||||||
endpoint: "build/Builds?branchName=&definitions=141"
|
endpoint: "build/Builds?branchName={branchName}&definitions={definitionId}"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user