Skip to content

feat: link workflows to projects and tags#70

Merged
joelorzet merged 1 commit into
mainfrom
feat/workflow-project-tag-linking
Jul 24, 2026
Merged

feat: link workflows to projects and tags#70
joelorzet merged 1 commit into
mainfrom
feat/workflow-project-tag-linking

Conversation

@joelorzet

Copy link
Copy Markdown
Contributor

Problem

kh project and kh tag can already create and list projects and tags, but kh workflow create and kh workflow update had no way to associate a workflow with one. Their request bodies only carried name/description/nodes/edges, so a workflow could not be placed in a project or labeled with a tag from the CLI, and an existing assignment could not be cleared.

Change

  • kh workflow create gains --project and --tag to assign a project/tag on creation (omitted from the request when unset).
  • kh workflow update gains --project and --tag. An empty value sends an explicit JSON null to unassign; an untouched flag is omitted so unrelated updates never disturb the assignment. The update body is now a map so null (unassign) and omit are distinguishable.
  • kh workflow list gains --project and --tag filters, forwarded to the API as projectId/tagId query params.

Tests

New project_tag_test.go covers the assign, unassign (empty value to null), and omit-when-unset paths for create and update, plus the list filter query params.

kh project and kh tag could already create and list projects and tags,
but kh workflow create/update had no way to associate a workflow with
one, so workflows could not be organized into projects or labeled from
the CLI.

Add --project and --tag to workflow create and workflow update; on update
an empty value sends an explicit null so the assignment is cleared, while
an untouched flag is omitted. Add --project and --tag filters to workflow
list. The update body is now a map so null (unassign) and omit are
distinguishable. Covered by tests for the assign, unassign, and omit paths.
@joelorzet
joelorzet requested a review from eskp July 24, 2026 13:27
@joelorzet
joelorzet merged commit 2ac6356 into main Jul 24, 2026
4 checks passed
@joelorzet
joelorzet deleted the feat/workflow-project-tag-linking branch July 24, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant