fix: recreate github review tasks after reset (#1492)

This commit is contained in:
Carlos Florêncio
2026-06-25 14:13:39 +01:00
committed by GitHub
parent 81ef4fb5e5
commit 365a3bdd24
14 changed files with 403 additions and 85 deletions
@@ -92,8 +92,13 @@ function useWatchActions(workspaceId?: string | null) {
const handleTrigger = useCallback(
async (id: string) => {
const watch = watches.find((item) => item.id === id);
if (!watch) {
toast({ description: "Review watch not found", variant: "error" });
return;
}
try {
const result = await trigger(id);
const result = await trigger(id, watch.workspace_id);
const count = result?.new_prs_found ?? 0;
if (count > 0) {
toast({
@@ -107,7 +112,7 @@ function useWatchActions(workspaceId?: string | null) {
toast({ description: "Failed to check for PRs", variant: "error" });
}
},
[trigger, toast],
[trigger, toast, watches],
);
const handleToggleEnabled = useCallback(