-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(718): issue view: raw response option #720
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mpalahuta, Thank you for working on this.
I was bit hesitant to support json response but since there are lot of requests for this (and now a PR), I am reconsidering my decision.
Having said that, if we want to go ahead with json response, I think we should send the entire raw json response from the API to the user. That would help us cover most of the usecase reported.
Let me know what you think!
Hey @ankitpokhrel Reg. raw response, sounds great, thanks! I will update this PR on Mon to do exactly that! |
hey @ankitpokhrel |
hi @ankitpokhrel, I am also interested in this improvement. Having this will enable new build/release automation scenarios for us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thank you 🎉
flagRaw = "raw" | ||
flagDebug = "debug" | ||
flagComments = "comments" | ||
flagPlain = "plain" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for refactoring this 👍🏻
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [ankitpokhrel/jira-cli](https://github.com/ankitpokhrel/jira-cli) | patch | `v1.5.1` -> `v1.5.2` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>ankitpokhrel/jira-cli (ankitpokhrel/jira-cli)</summary> ### [`v1.5.2`](https://github.com/ankitpokhrel/jira-cli/releases/tag/v1.5.2) [Compare Source](ankitpokhrel/jira-cli@v1.5.1...v1.5.2) #### What's Changed - feat: issue view: Raw response option by [@​mpalahuta](https://github.com/mpalahuta) in ankitpokhrel/jira-cli#720 - feat: Add original estimate option to issue creation by [@​rodcloutier](https://github.com/rodcloutier) in ankitpokhrel/jira-cli#748 - feat: Allow updating parent on edit by [@​ankitpokhrel](https://github.com/ankitpokhrel) in ankitpokhrel/jira-cli#765 - feat: Add cli method for close sprint with supporting jira client … by [@​cworsnup13](https://github.com/cworsnup13) in ankitpokhrel/jira-cli#756 ankitpokhrel/jira-cli#778 - fix: Epic description overridden in no-input mode by [@​ankitpokhrel](https://github.com/ankitpokhrel) in ankitpokhrel/jira-cli#728 - fix: Regression introduced by new OriginalEstimate attribute by [@​fabio42](https://github.com/fabio42) in ankitpokhrel/jira-cli#767 - fix: Consider Windows Terminal as non-dumb terminal by [@​beatbrot](https://github.com/beatbrot) in ankitpokhrel/jira-cli#706 - fix: Improve zsh autocomplete directions by [@​omair-inam](https://github.com/omair-inam) in ankitpokhrel/jira-cli#739 #### New Contributors - [@​mpalahuta](https://github.com/mpalahuta) made their first contribution in ankitpokhrel/jira-cli#720 - [@​omair-inam](https://github.com/omair-inam) made their first contribution in ankitpokhrel/jira-cli#739 - [@​rodcloutier](https://github.com/rodcloutier) made their first contribution in ankitpokhrel/jira-cli#748 - [@​fabio42](https://github.com/fabio42) made their first contribution in ankitpokhrel/jira-cli#767 - [@​cworsnup13](https://github.com/cworsnup13) made their first contribution in ankitpokhrel/jira-cli#756 **Full Changelog**: ankitpokhrel/jira-cli@v1.5.1...v1.5.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
#718
Adding
--json
flag to thejira issue view <KEY>
command so that the tool prints the issue contents as plain JSON if the flag is set. This feature allows users to process the issue information with their programs to support various automation scenarios.I've added an intermediate struct
printableIssue
to ensure correct null/empty values in the produced JSON, to avoid zero-values like