in operations/codeup/changeRequests.ts [158:178]
export async function listChangeRequestPatchSetsFunc(
organizationId: string,
repositoryId: string,
localId: string
): Promise<z.infer<typeof PatchSetSchema>[]> {
const encodedRepoId = handleRepositoryIdEncoding(repositoryId);
const url = `/oapi/v1/codeup/organizations/${organizationId}/repositories/${encodedRepoId}/changeRequests/${localId}/diffs/patches`;
const response = await yunxiaoRequest(url, {
method: "GET",
});
// 确保响应是数组
if (!Array.isArray(response)) {
return [];
}
// 解析每个版本对象
return response.map(patchSet => PatchSetSchema.parse(patchSet));
}