github-label-sync
github-label-sync copied to clipboard
Add more validations to labels name and description
What
The Github api has some validations besides character length.
-
Label Name:
-
Must contain more than native emojis
When using a name that only contains emojis, this error occurs:

-
-
Description:
-
4-byte characters are not allowed

-
Details
my labels.yml
- name: 😀 😃 😄 😁
color: "536266"
description: This is a name only contains emojis
- name: bug 🐞
color: d73a4a
description:
This is a description that contains emojis 4-byte unicode 🐞
With that file, the script will fail with the following message:
GitHub Error:
POST /repos/srealmoreno/test-label-sync/labels
422: Validation Failed
It would be great if you showed the error with --dry-run option.
Similar issues #42 #135