{"record":{"id":"2528e4acae74e21f","repo":"BloopAI/vibe-kanban","slug":"action-action-id-requires-both-workspace-and","errorCode":null,"errorMessage":"Action \"${action.id}\" requires both workspace and repository","messagePattern":"Action \"(.+?)\" requires both workspace and repository","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/web-core/src/shared/providers/ActionsProvider.tsx","lineNumber":290,"sourceCode":"    ): Promise<void> => {\n      try {\n        switch (action.requiresTarget) {\n          case ActionTargetType.NONE:\n            await action.execute(executorContext);\n            break;\n\n          case ActionTargetType.WORKSPACE:\n            if (!workspaceId) {\n              throw new Error(\n                `Action \"${action.id}\" requires a workspace target`\n              );\n            }\n            await action.execute(executorContext, workspaceId);\n            break;\n\n          case ActionTargetType.GIT:\n            if (!workspaceId || !repoIdOrProjectId) {\n              throw new Error(\n                `Action \"${action.id}\" requires both workspace and repository`\n              );\n            }\n            await action.execute(\n              executorContext,\n              workspaceId,\n              repoIdOrProjectId\n            );\n            break;\n\n          case ActionTargetType.ISSUE:\n            if (!repoIdOrProjectId || !issueIds || issueIds.length === 0) {\n              throw new Error(\n                `Action \"${action.id}\" requires project and issue selection`\n              );\n            }\n            await action.execute(executorContext, repoIdOrProjectId, issueIds);\n            break;","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/packages/web-core/src/shared/providers/ActionsProvider.tsx#L272-L308","documentation":"For actions with requiresTarget === ActionTargetType.GIT, executeAction requires BOTH a workspaceId and a repoIdOrProjectId; if either is missing it throws 'Action \"<id>\" requires both workspace and repository'. Git actions operate on a repository inside a workspace, so both identifiers are mandatory.","triggerScenarios":"Calling executeAction for a GIT action when workspaceId is undefined (no active workspace) or repoIdOrProjectId is undefined (no repository/project selected in the workspace view).","commonSituations":"Running git actions (branch, commit, PR creation) from a context menu whose repo selection hasn't loaded yet; triggering from outside the workspace repository view; clearing repo selection then firing the action via shortcut.","solutions":["Ensure the action is only offered from the workspace's repository view where both workspace and repo are known.","Pass both workspaceId and repoIdOrProjectId explicitly to executeAction.","Gate the action handler: verify both identifiers exist before dispatching, otherwise show a selection prompt."],"exampleFix":"// before\nexecuteAction(action);\n// after\nif (!currentWorkspaceId || !repoIdOrProjectId) return;\nexecuteAction(action, currentWorkspaceId, repoIdOrProjectId);","handlingStrategy":"validation","validationCode":"if (action.requiresTarget === ActionTargetType.GIT && (!workspaceId || !repoIdOrProjectId)) {\n  return; // both workspace and repo must be selected\n}\nexecuteAction(action, workspaceId, repoIdOrProjectId);","typeGuard":null,"tryCatchPattern":"try {\n  await executeAction(action, workspaceId, repoIdOrProjectId);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('requires both workspace and repository')) {\n    promptUserToSelectRepository();\n  }\n}","preventionTips":["Render GIT actions only within the workspace repository view","Disable action buttons until both workspace and repo selections are loaded","Reset pending actions when repo selection is cleared"],"tags":["actions","validation","missing-argument","git"],"backgroundTag":"missing-required-argument","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}