Files
KanbanGit/docs/releases/0.2-gitea-integration/05-ticket-branch-creation-from-ticket-detail.md
T

2.0 KiB

05 Ticket Branch Creation from Ticket Detail

Goal

Allow users to create a new repository branch directly from the ticket detail view while preserving the existing project-linked repository model and per-user Git credentials.

Requirements

  • Add a branch creation action to the ticket branch section.
  • Opening the action must show a modal dialog.
  • The dialog must list all repositories linked to the project.
  • The repository dropdown must still show repositories the current user cannot access through their own Git connection.
  • If the selected repository is not accessible for the current user:
    • the branch name field must be disabled
    • the final create button must be disabled
    • the UI must guide the user to their Git connection settings
  • If the selected repository is accessible:
    • prefill the branch name with the ticket key plus the ticket title
    • convert the suggestion to lowercase
    • replace spaces with -
    • allow the user to edit the branch name before creation
  • The dialog must show a validation state with a positive or negative indicator and a human-readable message.
  • Validation must cover both:
    • branch name syntax
    • branch name uniqueness for the selected repository
  • The create action must create the branch in Gitea.

Acceptance Criteria

  • The ticket branch section exposes a branch creation button.
  • Clicking the button opens a modal with a repository dropdown.
  • Selecting an inaccessible repository disables the rest of the flow and points the user to Git connection settings.
  • Selecting an accessible repository prepopulates the branch name using the ticket key and title pattern.
  • The validation message updates before creation and prevents creating an already existing branch.
  • Submitting the dialog creates the branch in the selected repository and returns the user to the ticket detail view.

Out of Scope

  • Choosing a custom source branch inside the UI
  • Branch creation for providers other than Gitea
  • Automatic pull request creation after branch creation