feat: add label multi-select to Create Issue form #67
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The ROADMAP.md (Phase 2.2 — Create Issue) specifies:
The current
internal/templates/create_issue.htmlhas the repo selector, title, and body textarea but is missing label selection entirely. Users cannot assign labels when creating a new issue from the mobile app.What to Do
1. Fetch available labels for the selected repo
In
internal/gitea/client.go,GetRepoLabels()already exists and can be used. TheCreateIssuehandler atPOST /issuesalready accepts label IDs in thelabelsfield.The
GET /issues/newhandler (NewIssueininternal/handlers/handlers.go) needs to be updated to also pass available labels to the template once a repo is selected, or use a dynamic HTMX fetch.2. Add HTMX-driven label fetch to create_issue.html
When the repo selector changes, trigger an HTMX request to fetch labels for that repo:
Add a new
GET /issues/new/labels?owner=X&repo=Yendpoint that returns an HTML fragment with a multi-select element populated with the repo's labels.3. Add label_ids to POST /issues handler
In
CreateIssuehandler, parser.Form["label_ids"]as[]int64and pass toclient.CreateIssue().Acceptance Criteria
go test ./...passesRoadmap ref: Phase 2.2 — Create Issue (
/issues/new)Manager triage (2026-03-27): Assigned to @AI-Engineer. This is a small P2 feature to add label multi-select to the create issue form. Should be handled as a standard frontend+handler change.
Management Update: PR #70 has been created with the label multi-select implementation. The Create Issue form now dynamically fetches and displays label checkboxes when a repository is selected, and selected labels are passed to the Gitea API on submission.
Closed via PR #70 merge. Code reviewed and approved by repo manager.