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 :

Add `label clone` command

#5452

heaths


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 :

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

๐Ÿ”– Resources


This content originally appeared on DEV Community and was authored by adriens


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » Github CLI v2.9.0 is out : clone labels feature #5452 is here." adriens | Sciencx - Wednesday April 27, 2022, https://www.scien.cx/2022/04/27/github-cli-v2-9-0-is-out-clone-labels-feature-5452-is-here/
HARVARD
adriens | Sciencx Wednesday April 27, 2022 » Github CLI v2.9.0 is out : clone labels feature #5452 is here., viewed ,<https://www.scien.cx/2022/04/27/github-cli-v2-9-0-is-out-clone-labels-feature-5452-is-here/>
VANCOUVER
adriens | Sciencx - » Github CLI v2.9.0 is out : clone labels feature #5452 is here. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/04/27/github-cli-v2-9-0-is-out-clone-labels-feature-5452-is-here/
CHICAGO
" » Github CLI v2.9.0 is out : clone labels feature #5452 is here." adriens | Sciencx - Accessed . https://www.scien.cx/2022/04/27/github-cli-v2-9-0-is-out-clone-labels-feature-5452-is-here/
IEEE
" » Github CLI v2.9.0 is out : clone labels feature #5452 is here." adriens | Sciencx [Online]. Available: https://www.scien.cx/2022/04/27/github-cli-v2-9-0-is-out-clone-labels-feature-5452-is-here/. [Accessed: ]
rf:citation
» Github CLI v2.9.0 is out : clone labels feature #5452 is here | adriens | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.