node-gitlab-2-github icon indicating copy to clipboard operation
node-gitlab-2-github copied to clipboard

Feature: transfer label descriptions

Open alystair opened this issue 3 years ago • 6 comments

  • Now when labels are transferred, their descriptions are as well!
  • Added some color options for your console output, feel free to use elsewhere :)
  • trimOversizedLabelDescriptions boolean option to trim them to the maximum allowable length instead of leaving blank, maybe a bit excessive feel free to remove this logic.

image

alystair avatar Oct 16 '22 00:10 alystair

Note the only major potential edge case I ~~haven't accounted for~~ is if there is a difference between maximum description length between the two - never bothered checking. Assuming the worst - If anyone ever complains you can just trim the description length and output a warning/notice to CLI ¯\_(ツ)_/¯

Edit: There was, see below. Fixed :)

alystair avatar Oct 16 '22 00:10 alystair

Hrm, actually looking at it now - it seems some label creations are failing silently

alystair avatar Oct 16 '22 00:10 alystair

LOL it's failing for the exact edge case I predicted - the label description length on GitHub is much shorter.

alystair avatar Oct 16 '22 00:10 alystair

Ok this is in a great place now, I added a trimOversizedLabelDescriptions boolean setting, when false (default) oversized descriptions are excluded, otherwise they are trimmed to 100 characters. Either way a warning is shown.

image

Oh yeah, I also added some static color consts - so you can throw those into your various console notices to spruce up the coloring to make it easier to see issues :)

alystair avatar Oct 16 '22 01:10 alystair

Getting a crash, not ready yet... failing on emojis in description.... guh. image

alystair avatar Oct 16 '22 01:10 alystair

OK, all fixed up and ready to go! 👍

alystair avatar Oct 16 '22 02:10 alystair

Thanks :)

spruce avatar Mar 15 '23 12:03 spruce