https://github.com/valeriobelli/gh-milestone
GitHub CLI extension for managing Milestones
https://github.com/valeriobelli/gh-milestone
cli gh gh-extension github golang milestones
Last synced: 3 months ago
JSON representation
GitHub CLI extension for managing Milestones
- Host: GitHub
- URL: https://github.com/valeriobelli/gh-milestone
- Owner: valeriobelli
- License: mit
- Created: 2022-04-25T17:24:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-18T23:01:55.000Z (over 2 years ago)
- Last Synced: 2025-05-05T04:36:19.264Z (11 months ago)
- Topics: cli, gh, gh-extension, github, golang, milestones
- Language: Go
- Homepage:
- Size: 198 KB
- Stars: 59
- Watchers: 2
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gh-extensions - valeriobelli/gh-milestone - 01-06 | GitHub CLI extension for managing Milestones | (🧩 Categories / Productivity / Workflow)
- awesome-gh-cli-extensions - **milestone** - GitHub CLI extension for managing milestones. (Github)
README
# gh milestone
A [gh](https://github.com/cli/cli) extension for managing Github Milestones
## Installation
```bash
gh extension install valeriobelli/gh-milestone
```
## Usage
By default, this extension uses the GitHub's Access Token of the current user for the host `github.com`.
You override the authentication of the current registered gh user by defining `GITHUB_TOKEN` in your environment variables. You can also override the host where your user is authenticated by setting `GITHUB_MILESTONE_HOST` still in your environment variables. By defining this latter, you change the behaviour of `gh config get --host oauth_token`, which is the command this extension relies upon.
### Create a new milestone
```bash
# Interactive mode
gh milestone create
# Flags mode
gh milestone create --title v1.0.0 --description "This is a description" --due-date 2022-06-01
```
### List milestones
```bash
# Extended command
gh milestone list
# Alias
gh milestone ls
# List closed Milestones
gh milestone list --state closed
# List milestones of specific repo
gh milestone list --repo valeriobelli/foo-bar
# Search by a pattern
gh milestone list --query "Foo bar"
# Get first ten milestones
gh milestone list --first 10
# Print milestones as JSON
gh milestone list --json id
gh milestone list --json id,progressPercentage --json number
# Access Milestone attributes via jq
gh milestone list --json id,progressPercentage --json number --jq ".[0].id"
```
### Edit a milestone
```bash
gh milestone edit --title "New title"
gh milestone edit --title "New title" --repo valeriobelli/foo-bar
```
### View a milestone
```bash
gh milestone view
gh milestone view --repo valeriobelli/foo-bar
```
### Delete milestone
```bash
# Interactive mode
gh milestone delete
# Automatic
gh milestone delete --confirm
gh milestone delete --confirm --repo valeriobelli/foo-bar
```