Skip to content

tnagatomi/gh-fuda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-fuda

gh-fuda is a gh extension which extends label manipulations.

Installation

Install as a gh extension (ref. gh manual of gh extension install).

gh extension install tnagatomi/gh-fuda

Usage

Login to GitHub with gh auth login (ref. gh manual of gh auth login) so that the extension can access the repositories.

Global Options

  • -R, --repos: Select repositories using the OWNER/REPO format separated by comma (e.g., owner1/repo1,owner2/repo1)
  • --dry-run: Check what operations would be executed without actually operating on the repositories

List of Commands

List Labels

gh fuda list

List existing labels from the specified repositories.

Example
gh fuda list -R "owner1/repo1,owner1/repo2,owner2/repo1"

Create Labels

gh fuda create

Create specified labels to the specified repositories.

Options
  • -l, --labels: Specify the labels to create in the format of 'label1:color1:description1[,label2:color2:description2,...]' (description can be omitted)
  • --json: Specify the path to a JSON file containing labels to create
  • --yaml: Specify the path to a YAML file containing labels to create

Note: --json, --yaml, and -l/--labels flags are mutually exclusive. You must use exactly one of these options.

Example
# Using inline labels
gh fuda create -R "owner1/repo1,owner1/repo2,owner2/repo1" -l "label1:ff0000:description for label 1,label2:00ff00,label3:0000ff"

# Using JSON file
gh fuda create -R "owner1/repo1,owner1/repo2,owner2/repo1" --json labels.json

# Using YAML file
gh fuda create -R "owner1/repo1,owner1/repo2,owner2/repo1" --yaml labels.yaml
JSON File Format
[
  {
    "name": "bug",
    "color": "d73a4a",
    "description": "Something isn't working"
  },
  {
    "name": "enhancement",
    "color": "a2eeef",
    "description": "New feature or request"
  },
  {
    "name": "documentation",
    "color": "07c",
    "description": "Improvements or additions to documentation"
  }
]
YAML File Format
- name: bug
  color: d73a4a
  description: Something isn't working
- name: enhancement
  color: a2eeef
  description: New feature or request
- name: documentation
  color: 07c
  description: Improvements or additions to documentation

Delete Labels

gh fuda delete

Delete specified labels from the specified repositories.

Options
  • -l, --labels: Specify the labels to delete in the format of 'label1[,label2,...]'
  • --force: Do not prompt for confirmation
Example
gh fuda delete -R "owner1/repo1,owner1/repo2,owner2/repo1" -l "label1,label2,label3"

Sync Labels

gh fuda sync

Sync the labels in the specified repositories with the specified labels.

Options
  • -l, --labels: Specify the labels to set in the format of 'label1:color1:description1[,label2:color2:description2,...]' (description can be omitted)
  • --json: Specify the path to a JSON file containing labels to sync
  • --yaml: Specify the path to a YAML file containing labels to sync
  • --force: Do not prompt for confirmation

Note: --json, --yaml, and -l/--labels flags are mutually exclusive. You must use exactly one of these options.

Example
# Using inline labels
gh fuda sync -R "owner1/repo1,owner1/repo2,owner2/repo1" -l "label1:ff0000:description for label 1,label2:00ff00,label3:0000ff"

# Using JSON file
gh fuda sync -R "owner1/repo1,owner1/repo2,owner2/repo1" --json labels.json

# Using YAML file
gh fuda sync -R "owner1/repo1,owner1/repo2,owner2/repo1" --yaml labels.yaml
File Formats

The JSON and YAML file formats are the same as those used for the create command. See the Create Labels section for details.

Empty Labels

gh fuda empty

Delete all labels from the specified repositories.

Options
  • --force: Do not prompt for confirmation
Example
gh fuda empty -R "owner1/repo1,owner1/repo2,owner2/repo1"

About

gh-fuda is a gh extension which extends label manipulations

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages