github-sync-labels-milestones icon indicating copy to clipboard operation
github-sync-labels-milestones copied to clipboard

Should an error be thrown if label currently exists?

Open Jammizzle opened this issue 9 years ago • 3 comments
trafficstars

More of a question, but if a Label/Milestone already exists, should an error message be the only message that is returned?

I found that I'd get this message: {"message":"Validation Failed","errors":[{"resource":"Label","code":"already_exists","field":"name"}],"documentation_url":"https://developer.github.com/v3/issues/labels/#create-a-label"}

But when actually checking my repositories, all the Labels are synced along with the Milestones - I believe the message at the end stating how many labels were created/edited should still be displayed as they technically do still change successfully.

Jammizzle avatar Nov 08 '16 15:11 Jammizzle

This seems to be related to #7.

If the exact label exists, no error is shown and it should work this way imo.

There are known issues with case sensitivity, i assume that you ran into one of these.

Could you provide steps to reproduce this issue?

Xiphe avatar Jan 22 '17 18:01 Xiphe

I see this error too. If I added "previousNames" to attempt a replace, it gives me:

Error: Can not rename label "difficulty:easy" to "difficulty:easy" since there is still a main definition "difficulty:easy"

daviddias avatar Jan 07 '19 10:01 daviddias

As I said this might be caused by the github api being case-insensitive. It would help if you could provied a detailed description of the existing labels, the cofiguration of the sync, the expected outcome and the actual outcome.

Xiphe avatar Jan 14 '19 22:01 Xiphe