-
-
Notifications
You must be signed in to change notification settings - Fork 280
feat: Add releases Subcommand #851
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: Add releases Subcommand #851
Conversation
8958001
to
3e50662
Compare
Add a subcommand for interacting with Jira releases (project versions) using the non paginated API endpoint (which provides less information compared to the paginated endpoint).
3e50662
to
ddbfbf1
Compare
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.
Pull Request Overview
This PR introduces a new "releases" subcommand to interact with Jira project versions using the non-paginated API endpoint. Key changes include:
- The addition of the ProjectVersion type and related API logic.
- New tests for release behavior and view rendering.
- Integration of the release subcommand into the cobra command hierarchy.
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pkg/jira/types.go | Added a new ProjectVersion type for Jira releases. |
pkg/jira/release_test.go | Created tests for validating the Release API call behavior. |
pkg/jira/release.go | Implemented the new Release function to fetch project versions. |
internal/view/release_test.go | Added tests to verify the release view rendering functionality. |
internal/view/release.go | Introduced a new Release view that formats and renders release data. |
internal/cmd/root/root.go | Integrated the new release subcommand into the root command. |
internal/cmd/release/release.go | Defined the cobra command for the release subcommand. |
internal/cmd/release/list/list.go | Implemented the list command that fetches and displays releases. |
README.md | Updated documentation to include usage information for releases. |
Files not reviewed (1)
- pkg/jira/testdata/releases.json: Language not supported
Comments suppressed due to low confidence (2)
internal/view/release.go:29
- The variable 'tabWidth' is used but not defined in this diff. Declare or import it to avoid compilation errors.
r.writer = tabwriter.NewWriter(r.buf, 0, tabWidth, 1, '\t', 0)
internal/view/release.go:53
- The function 'prepareTitle' is referenced but not defined in this diff; ensure it is declared or imported appropriately.
_, _ = fmt.Fprintf(r.writer, "%v\t%v\t%v\t%v\n", d.ID, prepareTitle(d.Name), d.Released, desc)
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.
LGTM overall. I'll do some minor updates later.
Thank you for contributing!
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [ankitpokhrel/jira-cli](https://github.com/ankitpokhrel/jira-cli) | minor | `v1.6.0` -> `v1.7.0` | 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.7.0`](https://github.com/ankitpokhrel/jira-cli/releases/tag/v1.7.0) [Compare Source](ankitpokhrel/jira-cli@v1.6.0...v1.7.0) This release adds CSV and JSON output support for issue listings and upgrades deprecated endpoints to ensure compatibility with the latest Jira APIs. > \[!IMPORTANT] > > - The [new API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-jql-get) does not return the total number of entries anymore, so the total issue count is no longer displayed in the search results. > - Consequently, the `startAt` parameter in the new API is unsupported. Therefore, the `from` part of the `--paginate=<from>:<limit>` flag is effectively ignored. Users can still paginate using the maxResults parameter (e.g., --paginate=10). #### 🥷 What's added? - feat: Add option to list issues in raw JSON by [@​evg656e](https://github.com/evg656e) in [#​840](ankitpokhrel/jira-cli#840) - feat: Add releases Subcommand by [@​vkhitrin](https://github.com/vkhitrin) in [#​851](ankitpokhrel/jira-cli#851) - feat: Support num comments in issue list cmd by [@​ankitpokhrel](https://github.com/ankitpokhrel) in [#​853](ankitpokhrel/jira-cli#853) - feat: Support CSV when listing issues by [@​ankitpokhrel](https://github.com/ankitpokhrel) in [#​854](ankitpokhrel/jira-cli#854) - feat: Allow skipping notification on edit by [@​ankitpokhrel](https://github.com/ankitpokhrel) in [#​855](ankitpokhrel/jira-cli#855) - feat: Add command line arg delimiter for custom delimiter instead of tab. by [@​iksi4prs](https://github.com/iksi4prs) in [#​662](ankitpokhrel/jira-cli#662) - feat: Add support for environment variable to specify config file path by [@​aazon](https://github.com/aazon) in [#​858](ankitpokhrel/jira-cli#858) #### 🐞 What's fixed? - fix: usernames can be 2 chars by [@​jontyq](https://github.com/jontyq) in [#​890](ankitpokhrel/jira-cli#890) - fix: Update deprecated endpoint by [@​ankitpokhrel](https://github.com/ankitpokhrel) in [#​892](ankitpokhrel/jira-cli#892) - fix: csv format priority by [@​ciricc](https://github.com/ciricc) in [#​882](ankitpokhrel/jira-cli#882) #### ☕️ Other changes - chore(docs): Add packaging stats to Installation section in README.md by [@​kskarthik](https://github.com/kskarthik) in [#​857](ankitpokhrel/jira-cli#857) #### New Contributors - [@​evg656e](https://github.com/evg656e) made their first contribution in [#​840](ankitpokhrel/jira-cli#840) - [@​vkhitrin](https://github.com/vkhitrin) made their first contribution in [#​851](ankitpokhrel/jira-cli#851) - [@​iksi4prs](https://github.com/iksi4prs) made their first contribution in [#​662](ankitpokhrel/jira-cli#662) - [@​aazon](https://github.com/aazon) made their first contribution in [#​858](ankitpokhrel/jira-cli#858) - [@​jontyq](https://github.com/jontyq) made their first contribution in [#​890](ankitpokhrel/jira-cli#890) - [@​ciricc](https://github.com/ciricc) made their first contribution in [#​882](ankitpokhrel/jira-cli#882) - [@​kskarthik](https://github.com/kskarthik) made their first contribution in [#​857](ankitpokhrel/jira-cli#857) **Full Changelog**: <ankitpokhrel/jira-cli@v1.6.0...v1.7.0> </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:eyJjcmVhdGVkSW5WZXIiOiI0MS45MS4zIiwidXBkYXRlZEluVmVyIjoiNDEuOTEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Add a subcommand for interacting with Jira releases (project versions)
using the non paginated API endpoint (which provides less
information compared to the paginated endpoint).