Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/router/worker-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function extractProjectIdFromJob(data: CascadeJob): Promise<string
// Use type assertion since dashboard jobs are cast to CascadeJob
const jobData = data as unknown as { type: string; projectId?: string; repoFullName?: string };

if (jobData.type === 'trello' || jobData.type === 'jira') {
if (jobData.type === 'trello' || jobData.type === 'jira' || jobData.type === 'linear') {
return jobData.projectId ?? null;
}
if (jobData.type === 'github') {
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/router/container-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ describe('extractProjectIdFromJob', () => {
expect(await extractProjectIdFromJob(job)).toBe('proj-jira');
});

it('returns projectId for linear jobs', async () => {
const job = { type: 'linear', projectId: 'proj-linear' } as unknown as CascadeJob;
expect(await extractProjectIdFromJob(job)).toBe('proj-linear');
});

it('returns projectId resolved from repo for github jobs', async () => {
const job = { type: 'github', repoFullName: 'owner/repo' } as CascadeJob;
mockFindProjectByRepo.mockResolvedValue({ id: 'proj-gh' } as never);
Expand Down
Loading