Skip to content
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

Feature: add a milestone command #21

Closed
benelan opened this issue May 18, 2024 · 0 comments · Fixed by #23 or #22
Closed

Feature: add a milestone command #21

benelan opened this issue May 18, 2024 · 0 comments · Fixed by #23 or #22
Assignees
Labels
enhancement New feature or request

Comments

@benelan
Copy link
Owner

benelan commented May 18, 2024

Description

Add a milestone command for viewing/editing milestones and their issues. Additionally, add keybindings to the issue and pr commands for adding, removing, and filtering by milestones.

Acceptance Criteria

  1. Add a new milestone command that lists a repo's open milestones.
  2. Add fzf keybindings to the milestone command for editing/closing/etc the selected milestone.
  3. Add fzf keybindings to the milestone command for running gh fzf issue and gh fzf pr filtered by the selected milestone.
  4. Add fzf keybindings to the issue and pr commands for setting the milestone by selecting one via gh fzf milestone

Relevant Info

The gh CLI doesn't have a milestone command, so I will need to use the api for criteria one and two. See:

gh help api

Criteria three and four can be accomplished with the issue and pr commands. For example:

# 3. filter by milestone
gh issue list --milestone 'v1.33.7'

# 4. set a milestone
gh pr edit --milestone 'v1.2.3'

Example Use Case

No response

@benelan benelan added the enhancement New feature or request label May 18, 2024
@benelan benelan self-assigned this May 18, 2024
@benelan benelan changed the title Feature: add a milestone command Feature: add a milestone command May 18, 2024
@benelan benelan linked a pull request Jun 3, 2024 that will close this issue
benelan added a commit that referenced this issue Jun 3, 2024
- Add `milestone` command to find/select milestones using `gh api`
- Add keybindings to the `milestone` command:
  - `enter`: Print the milestone title; useful for scripting
  - `alt-t`: Edit the title of the selected milestone
  - `alt-d` Edit the description of the selected milestone
  - `alt-X`: Close the selected milestone
  - `alt-O`: Reopen the selected milestone
  - `alt-i`: Execute `gh fzf issue` filtered for the selected milestone
  - `alt-s`: Show both open and closed milestones (default is open)
  - `alt-c`: Sort list by completeness (default is by due date)
  - `alt-D`: Display list in descending order (default is ascending)
- Add keybindings to the `issue` command:
- `alt-M`: Execute `gh fzf milestone` and filter the list of issues by
the selected item
- Add `GH_FZF_OPEN_CMD` environment variable to set the command used to
open the milestone in the browser. The default value should suffice in
most cases.

ref: https://docs.github.com/en/rest/issues/milestones
resolves #21
benelan added a commit that referenced this issue Jun 4, 2024
🤖 I have created a release *beep* *boop*
---


## [0.12.0](v0.11.0...v0.12.0)
(2024-06-03)


### Features

* **milestone, issue:** Add `milestone` command and an `alt-M`
keybinding for the `issue` command, which filters by the selected
milestone ([#23](#23))
([86cb9da](86cb9da)),
closes [#21](#21)
* **issue, pr:** Support fzf multi-selection when adding or removing
labels via `alt-l` or `alt-L` keybindings, respectively
([cac5f20](cac5f20))
* **label:** Include the selected label's name in the prompt for editing
the name via `alt-n`, description via `alt-d`, and color via `alt-c`
([d45ea06](d45ea06))
* **label:** Reload list after the edit keybindings (`alt-n`, `alt-d`,
`alt-c`) to ensure info is up to date
([b76453a](b76453a))
* **run:** Prompt to rerun (if failed) after viewing logs via the
`dunstify` notification action
([ff14747](ff14747))


### Bug Fixes

* **issue, pr:** Exit with code 0 after checking out a branch via the
`alt-o` keybindings
([2dbea75](2dbea75))
* **label:** Fix regression where `enter` keybinding printed the whole
row of the selected item(s), rather than only the name
([44bd0af](44bd0af))
* **run:** Fix the message/format of notifications when the watcher's
process is killed before completion
([b419d35](b419d35))


---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben Elan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant