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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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