Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

optionally display label on issues #540

Closed
zevaverbach opened this issue Jun 14, 2018 · 7 comments · Fixed by #550
Closed

optionally display label on issues #540

zevaverbach opened this issue Jun 14, 2018 · 7 comments · Fixed by #550
Labels

Comments

@zevaverbach
Copy link
Contributor

perhaps with --label?

@protoEvangelion
Copy link
Member

Hmm we actually have a flag for that already but it doesn't seem to be working.

Currently I am working on completely refactoring the code base to use GitHub's GraphQL api. I will make sure this works when we release v2.

At my current pace, I am estimating v2 will be release in April 2019. If that is too long for you to wait, I would be happy to merge a PR from you if you can find a fix for this.

@zevaverbach
Copy link
Contributor Author

@protoEvangelion trying to get started on this, and did the steps outlined in Contributing, including npm rm -g gh and npm link of my fork. However, I can't get any console.log or process.stdout.write calls to produce stdout output when invoking gh. Pardon my newbness, but do you have any suggestions?

@protoEvangelion
Copy link
Member

@zevaverbach no problem at all! I am happy to help 😄 Try this:

npm uninstall -g gh
npm link

Let me know if that works. If not please let me know which file you are trying to log from.

@zevaverbach
Copy link
Contributor Author

@protoEvangelion awesome, thanks! See #550.

@protoEvangelion
Copy link
Member

protoEvangelion commented Jul 26, 2018

On second thought I think I misread your intent.
Is your goal to run something like: gh issue --list --label and it print out the labels for you?
If so we do have a flag that will filter issues by label: gh issue --list --label bug and that works correctly.
If you want to add a flag to print labels we could add a flag something along the lines of gh issue --list --show-labels

@zevaverbach
Copy link
Contributor Author

zevaverbach commented Jul 26, 2018

@protoEvangelion after having delved into the codebase a little, I realized that what I really wanted was for labels to be displaying when the --detailed flag is present, which I think is the intention in the current issue.js. (or if labels are set up to be displayed in ~/.gh.json, as you suggested in #548) This isn't currently happening because of a couple of bugs which have fixes in #550.

So no, I didn't have that particular use case in mind, but that's good to know about --list --label label_name.

#550 accomplishes what you suggested above, only using --detailed instead of --show-labels. Should I change the PR so that it works with both --detailed and --show-labels?

@protoEvangelion
Copy link
Member

Thanks for the clarification. I think it would be ideal to only show labels in --detailed or if the user has specified that they would like labels to show up by default as discussed here: #548

protoEvangelion pushed a commit that referenced this issue Jul 26, 2018
…nonexistent attribute `issue.label`, fixed with `issue.labels`. Further down, the `labels` array was pushed to from itself with `label.name`, rather than making a fresh array of label strings for display. Finally, made a distinctive color for issue display and displayed the appropriate singular/plural of 'label'.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants