github-label-sync icon indicating copy to clipboard operation
github-label-sync copied to clipboard

Add more validations to labels name and description

Open srealmoreno opened this issue 3 years ago • 0 comments

What

The Github api has some validations besides character length.

  • Label Name:

    1. Must contain more than native emojis

      When using a name that only contains emojis, this error occurs: image

  • Description:

    1. 4-byte characters are not allowed

      image

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

srealmoreno avatar Jun 13 '22 19:06 srealmoreno