DEV Community

Cover image for 🏷️ Github CLI v2.9.0 is out : clone labels feature #5452 is here
adriens for opt-nc

Posted on β€’ Edited on

4 3

🏷️ Github CLI v2.9.0 is out : clone labels feature #5452 is here

πŸ™‹ Intro

GitHub CLI v2.9.0 is out and brings some nice new features around labels :

Image description

As recently I felt the need (for organizational level reporting) to synchronize labels on distinct repos (see dedicated feedback) :
Image description

, 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
Enter fullscreen mode Exit fullscreen mode

πŸ”– Resources

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here β†’

Top comments (1)

Collapse
 
adriens profile image
adriens β€’

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook