mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 19:00:38 +09:00
Exclude default shared workspaces from tab
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
b69f0b7dc4
commit
0ff778ec29
2 changed files with 42 additions and 0 deletions
|
|
@ -36,6 +36,16 @@ function primaryWorkspaceId(project: ProjectWorkspaceLike): string | null {
|
|||
?? null;
|
||||
}
|
||||
|
||||
function isDefaultSharedExecutionWorkspace(input: {
|
||||
executionWorkspace: ExecutionWorkspace;
|
||||
issue: Issue;
|
||||
primaryWorkspaceId: string | null;
|
||||
}) {
|
||||
const linkedProjectWorkspaceId =
|
||||
input.executionWorkspace.projectWorkspaceId ?? input.issue.projectWorkspaceId ?? null;
|
||||
return input.executionWorkspace.mode === "shared_workspace" && linkedProjectWorkspaceId === input.primaryWorkspaceId;
|
||||
}
|
||||
|
||||
export function buildProjectWorkspaceSummaries(input: {
|
||||
project: ProjectWorkspaceLike;
|
||||
issues: Issue[];
|
||||
|
|
@ -54,6 +64,11 @@ export function buildProjectWorkspaceSummaries(input: {
|
|||
if (issue.executionWorkspaceId) {
|
||||
const executionWorkspace = executionWorkspacesById.get(issue.executionWorkspaceId);
|
||||
if (!executionWorkspace) continue;
|
||||
if (isDefaultSharedExecutionWorkspace({
|
||||
executionWorkspace,
|
||||
issue,
|
||||
primaryWorkspaceId: primaryId,
|
||||
})) continue;
|
||||
|
||||
const existing = summaries.get(`execution:${executionWorkspace.id}`);
|
||||
const nextIssues = [...(existing?.issues ?? []), issue].sort(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue