enter image description here我有一个单一存储库,其中包含所有 API 和函数应用程序的 1 个解决方案文件。我为所有 API 和函数应用程序创建了单独的管道。如果 API 或函数应用程序之一发生任何更改,则必须触发特定管道。但对我来说,所有的管道都在触发。所以我在管道中添加了触发器过滤路径。但是添加触发路径过滤器后不会自动触发。 enter image description here
答案 0 :(得分:0)
包含路径应该是路径而不是其他,例如:
我的回购结构:
现在,我指定文件 import React, {useState} from 'react';
const MyComponent = () => {
const [PageData, setPageData] = useState([
{name: "item1", id: "1"},
{name: "item2", id: "2"},
{name: "item3", id: "3"}
])
const duplicateItem = (RowItem, i) => {
let RowsData = [...PageData];
let Index = parseInt(i + 1);
RowsData.splice(Index, 0, Duplicate);
setPageData(RowsData);
}
return (
<div>
{PageData.map((Item, i) =>(
<div className="form-row" key={i}>
<p>{Item.name}</p>
<button
onClick={() => duplicateItem(Item, i)}
className="duplicate"
>
</button>
</div>
))}
</div>
)
}
export default MyComponent;
作为触发器路径。我的 YAML 构建触发器配置:
test.java
结果: