himynameisdave / git-labelmaker

:flags: Manage your GitHub labels from the command line!
MIT License
574 stars 33 forks source link

Support for International Charaters #95

Open oldiron-ho opened 5 years ago

oldiron-ho commented 5 years ago

When using Korean characters label, removing labels make some error. It seems that international charaters in a label cause encoding problem.

https://github.com/himynameisdave/git-labelmaker/blob/dbe537fc0e06261fca13339ee5094c877809694b/bin/index.js#L123-L125

Above code should be

          if (confirmRemove.youSure) {
             answers.removals.forEach(function(removal) {
                removal.name=encodeURIComponent(removal.name);
             })  
            return gitLabel.remove(configGitLabel(repo, token), answers.removals); 
         } 

I confirmed that the problem was resolved.