Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions apps/api/src/tools/task-board/pr-open-board-reaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,18 @@ export async function reactToPrOpenedForBoard(
const pr = extractPrFromValue(source);
if (!pr) return;

// Resolved up front: an org-owned board's archive column isn't literally "archived".
const board = await boardFor(ctx, orgId);
const lanes = await board.lanes();

const cards = await ctx.storage.taskBoard.list(orgId);
const openCards = cards
.filter((t) => t.status !== "done" && t.status !== "archived")
.filter(
(t) =>
t.status !== "done" &&
t.status !== "archived" &&
t.status !== lanes.archive,
)
.slice(0, MAX_OPEN_CARDS_FOR_DECISION);
const thread = await ctx.storage.threads.get(threadId);

Expand All @@ -285,9 +294,8 @@ export async function reactToPrOpenedForBoard(
);
if (!decision) return;

const board = await boardFor(ctx, orgId);
await applyBoardDecision(ctx.storage.taskBoard, {
lanes: await board.lanes(),
lanes,
columns: await board.columns(),
columnOwner: board.columnOwner(),
orgId,
Expand Down
Loading