change to have repositoryId and not branchName
This commit is contained in:
parent
017a8152df
commit
efb8388dec
@ -294,7 +294,7 @@ export function cleanServiceGroups(groups) {
|
||||
snapshotHost, // kopia
|
||||
snapshotPath,
|
||||
userEmail, // azuredevops
|
||||
branchName
|
||||
repositoryId
|
||||
} = cleanedService.widget;
|
||||
|
||||
let fieldsList = fields;
|
||||
@ -316,7 +316,7 @@ export function cleanServiceGroups(groups) {
|
||||
|
||||
if (type === "azuredevops") {
|
||||
if (userEmail) cleanedService.widget.userEmail = userEmail;
|
||||
if (branchName) cleanedService.widget.branchName = branchName;
|
||||
if (repositoryId) cleanedService.widget.repositoryId = repositoryId;
|
||||
}
|
||||
|
||||
if (type === "coinmarketcap") {
|
||||
|
||||
@ -7,14 +7,14 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
export default function Component({ service }) {
|
||||
const { t } = useTranslation();
|
||||
const { widget } = service;
|
||||
const { userEmail, branchName } = widget;
|
||||
const includePR = userEmail !== undefined && branchName !== undefined;
|
||||
const { userEmail, repositoryId } = widget;
|
||||
const includePR = userEmail !== undefined && repositoryId !== undefined;
|
||||
const { data: prData, error: prError } = useWidgetAPI(widget, "pr");
|
||||
const { data: pipelineData, error: pipelineError } = useWidgetAPI(widget, "pipeline");
|
||||
|
||||
if (
|
||||
pipelineError ||
|
||||
(includePR && (prError || prData?.errorCode !== null))
|
||||
(includePR && (prError || prData?.errorCode !== undefined))
|
||||
) {
|
||||
let finalError = pipelineError ?? prError;
|
||||
if (includePR && prData?.errorCode !== null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user