This content originally appeared on DEV Community and was authored by adriens
🙋 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
🔖 Resources
This content originally appeared on DEV Community and was authored by adriens
adriens | Sciencx (2022-04-27T19:58:11+00:00) Github CLI v2.9.0 is out : clone labels feature #5452 is here. Retrieved from https://www.scien.cx/2022/04/27/github-cli-v2-9-0-is-out-clone-labels-feature-5452-is-here/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.