status filter

This commit is contained in:
2026-03-13 17:03:10 +01:00
parent 14df23e00f
commit e763659b60
4 changed files with 101 additions and 11 deletions

View File

@@ -48,10 +48,13 @@ func (ui *UI) PrintProjects(projects []model.Project) {
// PrintUsage prints the application usage message to stderr and exits.
func (ui *UI) PrintUsage(appName string) {
ui.Printf("Usage: %s <project-id>\n", appName)
ui.Printf(" REDMINE_URL and REDMINE_TOKEN must be set in .env, as environment variables, or in ~/.redmine-tree.json.\n")
ui.Printf("Example: REDMINE_URL=https://redmine.example.com REDMINE_TOKEN=abc123 %s my-project\n", appName)
ui.Printf("Or: %s my-project (if REDMINE_URL, REDMINE_TOKEN are in .env or ~/.redmine-tree.json)\n", appName)
ui.Printf("Usage: %s [options] <project-id>\n", appName)
ui.Printf("Options:\n")
ui.Printf(" -status <statuses> Include only issues with these statuses (comma-separated names or IDs)\n")
ui.Printf(" -exclude-status <statuses> Exclude issues with these statuses (comma-separated names or IDs)\n\n")
ui.Printf("Environment:\n")
ui.Printf(" REDMINE_URL and REDMINE_TOKEN must be set in .env, as environment variables, or in ~/.redmine-tree.json.\n")
ui.Printf("Example: REDMINE_URL=https://redmine.example.com REDMINE_TOKEN=abc123 %s -status 'In Progress' my-project\n", appName)
os.Exit(1)
}