node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

optionally display label on issues #540

Closed zevaverbach closed 6 years ago

zevaverbach commented 6 years ago

perhaps with --label?

protoEvangelion commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

@protoEvangelion awesome, thanks! See #550.

protoEvangelion commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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