๐ Intro
GitHub CLI v2.9.0
is out and brings some nice new features around labels :
As recently I felt the need (for organizational level reporting) to synchronize labels on distinct repos (see dedicated feedback) :
, this latest release was the perfect match โฃ๏ธ
๐๏ธ The demo
A short video worths a thousand words so here go ๐
๐ Movie script
โ ๏ธ Replace with your accountโ ๏ธ
clear
# ๐ค So a new release is avilable for Gtihub Cli โ
# ๐ What's new on v2.9.0... let's find out ๐
gh release view v2.9.0 --repo cli/cli
# ๐ ... and what is cli/cli #5452 "label clone" feature โ
gh issue view 5452 --repo cli/cli
# ๐ Let's give it a try โฃ๏ธ
# 1๏ธโฃ Create a master repo
gh repo create gh-cli-demo-labels-master --public
# ๐ท๏ธ See labels on the newly created repo ๐
gh label list --repo adriens/gh-cli-demo-labels-master
# โ Create a custom label ๐ฆฉ
gh label create SOMETHING_PINK --description "I love pink things" --color FFC0CB --repo adriens/gh-cli-demo-labels-master
# โ
And check it has been created ๐
gh label list --repo adriens/gh-cli-demo-labels-master
# ๐ Look for the newly created label ๐
gh label list --repo adriens/gh-cli-demo-labels-master | grep PINK
# โ Now, create a new repo...
gh repo create gh-cli-demo-labels-synced --public
# ... List existing labels on te newly created repo
gh label list --repo adriens/gh-cli-demo-labels-synced
# โ
Check that the PINK label does not exists
gh label list --repo adriens/gh-cli-demo-labels-synced | grep PINK
# ๐ช Sync labels โจ
gh label clone adriens/gh-cli-demo-labels-master --repo adriens/gh-cli-demo-labels-synced
# ๐ต๏ธ See if the clone command did work ๐ค
gh label list --repo adriens/gh-cli-demo-labels-synced | grep PINK
# ๐ Job done ๐คธ
# ๐งฝ Cleanup the mess ๐งผ
gh repo delete adriens/gh-cli-demo-labels-master --confirm
gh repo delete adriens/gh-cli-demo-labels-synced --confirm
# ๐ฌ That's all folks
gh repo view cli/cli
# ๐ Go like it ๐
gh repo view cli/cli --web