Update Plugin functions for newer glab versions

Changes:
- Removed unsupported flag '--state opened' from glissue-list'
- Updated glreleases-create to use --name instead of -t
- Updated glrepo-list to remove unsupported --membership flag
This commit is contained in:
Amaan Mujawar 2025-09-19 08:24:24 +01:00
commit 0c733b810a
No known key found for this signature in database
GPG key ID: E0ECE2A906DA1AF4
2 changed files with 10 additions and 4 deletions

View file

@ -20,7 +20,6 @@ This plugin adds support for the [GitLab CLI (`glab`)](https://gitlab.com/gitlab
| `glci` | `glab ci` | Manage CI pipelines |
| `glprj` | `glab project` | Manage projects |
| `glrelease` | `glab release` | Manage releases |
| `gli` | `glab incident` | Manage incidents |
## Helper functions

View file

@ -69,7 +69,7 @@ glissue-close() {
# List open issues assigned to me
glissue-list() {
glab issue list --assignee "@me" --state opened "$@"
glab issue list --assignee "@me" "$@"
}
# --- CI/CD Helper Functions ---
@ -99,7 +99,7 @@ glrepo-clone() {
# List all projects Im a member of
glrepo-list() {
glab repo list --membership "$@"
glab repo list "$@"
}
# Open a repository in browser
@ -116,9 +116,16 @@ glrepo-starred() {
# Create a release: glrelease-create "Title" "Tag"
glrelease-create() {
glab release create -t "$1" "$2"
if [ -z "$1" ]; then
echo "Usage: glrelease-create <tag> [release name]"
return 1
fi
local tag="$1"
local name="${2:-$1}" # Use tag as name if no name provided
glab release create "$tag" --name "$name"
}
# --- Search Helper Function ---
# Search merge requests and issues