Skip to content

Human-friendly workspace branch naming#68

Open
manuelkiessling wants to merge 2 commits intomainfrom
feature/human-friendly-workspace-branch-naming
Open

Human-friendly workspace branch naming#68
manuelkiessling wants to merge 2 commits intomainfrom
feature/human-friendly-workspace-branch-naming

Conversation

@manuelkiessling
Copy link
Member

Summary

Implements human-friendly workspace branch naming as specified in #67.

Format: <YYYY-MM-DD H:i:s>-usermailATdomainDOTtld-SHORTWORKSPACEID

Example: 2025-02-05 14:30:22-manuelATkiesslingDOTnet-a1b2c3d4

Changes

  • BranchNameGenerator (Domain): generates branch names with timestamp, sanitized user email (@→AT, .→DOT), and short workspace ID (first 8 chars).
  • User email required in setup flow:
    • dispatchSetupIfNeeded(projectId, userEmail) on facade and interface.
    • SetupWorkspaceMessage(workspaceId, userEmail).
    • WorkspaceSetupService::setup(workspace, userEmail).
  • Call sites: Controller passes $accountInfo->email; prefab subscriber resolves $event->accountCoreId via AccountFacade and passes account email (throws if account not found).
  • BranchNameGeneratorInterface for domain-service-interface-only rule; wired in config/services.yaml.
  • Unit tests: BranchNameGeneratorTest (format, email sanitization, short ID).
  • Docs: project-workspace-conversation-workflow-high-level.md updated to new format.

Checklist

  • New branches use the required format when user email is passed.
  • User email is required from both call sites (controller + prefab subscriber).
  • Existing workspaces unchanged; only new setups use the new format.
  • Branch names valid for Git/GitHub.
  • Unit tests for the formatter.
  • mise run quality and mise run tests and mise run tests:frontend pass.

Fixes #67

- Add BranchNameGenerator (Domain) with format:
  <YYYY-MM-DD H:i:s>-usermailATdomainDOTtld-SHORTWORKSPACEID
- Require userEmail in dispatchSetupIfNeeded and SetupWorkspaceMessage
- Thread userEmail through setup: controller (accountInfo->email),
  prefab subscriber (accountCoreId -> account email)
- Unit tests for BranchNameGenerator (format, sanitization, short ID)
- Update docs (project-workspace-conversation-workflow-high-level.md)
- Wire BranchNameGeneratorInterface in config/services.yaml

Fixes #67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Human-friendly workspace branch naming

1 participant