size-label-action icon indicating copy to clipboard operation
size-label-action copied to clipboard

Automatically set label colors

Open steebchen opened this issue 6 years ago • 5 comments

I'm not sure if this is possible, but it would be awesome if this action could automatically set colors from green to red like Kubernetes does.

steebchen avatar Mar 16 '19 13:03 steebchen

I consider label creation out of scope for this action, as there is already at least one action that can take care of it. In my opinion it's better to have all labels in one configuration file so they can be managed in a central place, instead of having each action modify the project's labels.

I would recommend to use issue-label-manager-action. You could use the following configuration to copy the Kubernetes labels:

[
  {
    "name": "size/XS",
    "color": "009900",
    "description": "Denotes a PR that changes 0-9 lines, ignoring generated files."
  },
  {
    "name": "size/S",
    "color": "77bb00",
    "description": "Denotes a PR that changes 10-29 lines, ignoring generated files."
  },
  {
    "name": "size/M",
    "color": "eebb00",
    "description": "Denotes a PR that changes 30-99 lines, ignoring generated files."
  },
  {
    "name": "size/L",
    "color": "ee9900",
    "description": "Denotes a PR that changes 100-499 lines, ignoring generated files."
  },
  {
    "name": "size/XL",
    "color": "ee5500",
    "description": "Denotes a PR that changes 500-999 lines, ignoring generated files."
  },
  {
    "name": "size/XXL",
    "color": "ee0000",
    "description": "Denotes a PR that changes 1000+ lines, ignoring generated files."
  }
]

pascalgn avatar Mar 17 '19 11:03 pascalgn

That would force me to manage my labels from the repo from now on which I would first have to think about. Thanks for the link though.

steebchen avatar Mar 17 '19 13:03 steebchen

We now have https://github.com/pascalgn/size-label-action#create-the-needed-labels which is maybe better than nothing. If you want to create a PR for this, feel free and I will have a look at it! 👍

pascalgn avatar Feb 14 '21 16:02 pascalgn

@pascalgn , this is for PR labeling , is there any similar feature for issue labling? Thank you

baibhavKumar1 avatar Aug 20 '23 14:08 baibhavKumar1

How do you expect that to work? Counting the number of words in the issue description? I'm not sure if that would be very useful...

pascalgn avatar Aug 20 '23 15:08 pascalgn