[] = useMemo(
() => [
{
accessorKey: "forgejo_issue_number",
header: "#",
cell: ({ row }) => (
#{row.original.forgejo_issue_number}
),
},
{
accessorKey: "title",
header: "Title",
cell: ({ row }) => (
{row.original.title}
),
},
{
accessorKey: "body_preview",
header: "Description",
cell: ({ row }) => {
const body = row.original.body_preview;
if (!body) return null;
const truncated = body.length > 120 ? body.slice(0, 120) + "…" : body;
return (
{truncated}
);
},
},
{
accessorKey: "state",
header: "State",
cell: ({ row }) => {
const state = row.original.state;
return (
{state}
);
},
},
{
accessorKey: "labels",
header: "Labels",
cell: ({ row }) => {
const labels = row.original.labels;
if (!labels || labels.length === 0) return null;
const visible = labels.slice(0, 3);
const overflow = labels.length - visible.length;
return (
{visible.map((label, i) => (
))}
{overflow > 0 && (
+{overflow}
)}
);
},
},
{
accessorKey: "author",
header: "Author",
cell: ({ row }) => (
{row.original.author || "Unknown"}
),
},
{
accessorKey: "forgejo_updated_at",
header: "Updated",
cell: ({ row }) => {
try {
return (
{new Date(row.original.forgejo_updated_at).toLocaleDateString()}
);
} catch {
return (
{row.original.forgejo_updated_at}
);
}
},
},
{
id: "actions",
header: "Actions",
cell: ({ row }) => {
const issue = row.original;
if (issue.state !== "open" || issue.is_pull_request) return null;
return (
);
},
},
],
[handleCloseClick],
);
const table = useReactTable({
data: issues,
columns,
getCoreRowModel: getCoreRowModel(),
});
return (
<>
,
title: "No Git Project issues found",
description:
"Sync a repository to pull issues into Pipeline, or adjust your filters.",
}}
/>
>
);
}