Add tm_server with SQLite, Svelte UI, and task-master TUI sync.
Introduces the web backend (auth, RBAC, project tokens, revisions), YouTrack-or-taskmaster backend choice in the TUI, and a first-pass embedded Svelte UI. The frontend is functional but needs a major rework. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package syncbackend
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"task/internal/youtrack"
|
||||
)
|
||||
|
||||
// ListYouTrackProjects lists projects via a master/instance token.
|
||||
func ListYouTrackProjects(ctx context.Context, baseURL, token string) ([]RemoteProject, error) {
|
||||
client := &youtrack.Client{BaseURL: baseURL, Token: token}
|
||||
projects, err := client.ListProjects(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out := make([]RemoteProject, 0, len(projects))
|
||||
for _, p := range projects {
|
||||
name := p.Name
|
||||
if name == "" {
|
||||
name = p.ShortName
|
||||
}
|
||||
out = append(out, RemoteProject{
|
||||
Key: p.ShortName,
|
||||
Name: name,
|
||||
ID: p.ID,
|
||||
})
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
Reference in New Issue
Block a user