Created
June 30, 2025 17:43
-
-
Save jeremystretch/8b73eb2217835cd848c857afeadce231 to your computer and use it in GitHub Desktop.
Copy GitHub issue labels from one repository to another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gh api repos/$ORGANIZATION/$SOURCE_REPO/labels --paginate > labels.json | |
| jq -c '.[]' labels.json | while read -r label; do | |
| name=$(echo "$label" | jq -r '.name') | |
| color=$(echo "$label" | jq -r '.color') | |
| description=$(echo "$label" | jq -r '.description') | |
| gh api repos$ORGANIZATION/$TARGET_REPO/labels -f name="$name" -f color="$color" -f description="$description" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment