Add `tea issues --fields`, allow printing labels #312

Merged
6543 merged 16 commits from noerw/tea:print-issue-fields-labels into master 4 months ago
noerw commented 4 months ago
  • refactor the field selection of tea repos ls --fields, so it can be reused with other entities.
  • use the new generic --fields flag & tableFromItems() to add field selection to tea issues ls & tea ms issues
  • add more printable fields to issues, most importantly colored labels :) (fixes #268)

Maybe we should reconsider the default fields that are printed for issues. At least labels should be included I think, not sure if we really need author and updated by default

- refactor the field selection of `tea repos ls --fields`, so it can be reused with other entities. - use the new generic `--fields` flag & `tableFromItems()` to add field selection to `tea issues ls` & `tea ms issues` - add more printable fields to issues, most importantly colored labels :) (fixes #268) Maybe we should reconsider the default fields that are printed for issues. At least `labels` should be included I think, not sure if we really need `author` and `updated` by default
noerw added this to the v0.7.0 milestone 4 months ago
noerw added the
kind/enhancement
kind/refactor
labels 4 months ago
noerw added 8 commits 4 months ago
6543 reviewed 4 months ago
cmd/issues/list.go Outdated
}
print.IssuesList(issues, ctx.Output)
fields, _ := flags.GetFields(cmd, nil)
6543 commented 4 months ago
Poster
Collaborator
-	fields, _ := flags.GetFields(cmd, nil)
+	fields, err := flags.GetFields(cmd, print.IssueFields)
+	if err != nil {
+		return err
+	}
```diff - fields, _ := flags.GetFields(cmd, nil) + fields, err := flags.GetFields(cmd, print.IssueFields) + if err != nil { + return err + } ```
noerw marked this conversation as resolved
Collaborator

now you use FullName for user, can you add a fiel username witch instead of FullName always use username?

now you use FullName for user, can you add a fiel username witch instead of FullName always use username?
noerw added 3 commits 4 months ago
Poster

now you use FullName for user, can you add a fiel username witch instead of FullName always use username?

@6543 This actually was the behaviour before too. I added author-id to get just the raw username.

> now you use FullName for user, can you add a fiel username witch instead of FullName always use username? @6543 This actually was the behaviour before too. I added `author-id` to get just the raw username.
noerw added 1 commit 4 months ago
fb8d82f90a
change default fields
lunny approved these changes 4 months ago
noerw added 1 commit 4 months ago
561a31c2fd
fixup! validate provided fields
noerw added 1 commit 4 months ago
68339676fb Merge branch 'master' into print-issue-fields-labels
6543 added 1 commit 4 months ago
144df8384b Merge branch 'master' into print-issue-fields-labels
6543 approved these changes 4 months ago
6543 added 1 commit 4 months ago
e1fb8682fb
Validate Fields for repos
6543 merged commit 9efee7bf99 into master 4 months ago
6543 deleted branch print-issue-fields-labels 4 months ago

Reviewers

lunny approved these changes 4 months ago
6543 approved these changes 4 months ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 9efee7bf99.
Sign in to join this conversation.
Loading…
There is no content yet.