prlint icon indicating copy to clipboard operation
prlint copied to clipboard

Feature request: Better label support

Open ewolfe opened this issue 6 years ago • 1 comments

this is really cool - I'm curious: how does it work with labels? I've often wanted an easy way to block PR merging using labels like dont-merge and allow using ready

I think it would a good idea to massage the data coming from GitHub, so the end user can setup a rule like so:

{
  "labels.names": [
    {
      "pattern": "ready",
      "message": "Please add a 'ready' label"
    },
    {
      "pattern": "!dont-merge",
      "message": "Please remove the 'dont-merge' label"
    }
  ]
}

Thanks to @eudaimos for the feedback!

ewolfe avatar Sep 13 '18 04:09 ewolfe

Better yet, introduce a "patternToReject" (for lack of a better name) key:

{
  "labels.names": [
    {
      "pattern": "ready",
      "message": "Please add a 'ready' label"
    },
    {
      "patternToReject": "dont-merge",
      "message": "Please remove the 'dont-merge' label"
    }
  ]
}

ewolfe avatar Sep 13 '18 18:09 ewolfe