π 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
Top comments (1)