gh-environments

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 2 Imported by: 0

README

gh-environments

ci Release

A gh-cli extension for managing environments.

Installation and Upgrades

gh extension install chelnak/gh-environments
gh extension upgrade chelnak/gh-environments

Usage

gh environments --help

Setting aliases

It's possible to set command aliases with gh alias set. Here are some examples for the gh environments extension:

# Set a short name for the command
gh alias set env environments

# Or save a complex jq query
gh alias set myalias "environments list --json -q '.[] | select(.name | contains(""\"te""\"))'"

Advanced usage

Remove multiple environments at once

#! /bin/bash

set -e

envs=$(gh environments list --json -q '.[] | select(.name | contains("temp-")) | .name')
for row in $(echo "${envs}" | jq -r '.[]'); do
    echo "Removing environment $row"
    gh environments delete $row --force
done

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL