Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add matchers field to nest matchers within a rule #86

Open
cyamonide opened this issue Aug 23, 2020 · 1 comment
Open

Add matchers field to nest matchers within a rule #86

cyamonide opened this issue Aug 23, 2020 · 1 comment
Labels

Comments

@cyamonide
Copy link
Collaborator

We want to achieve the following interface:

{
  "name": "foobar",
  "action": "comment",
  "matchers": {
    "includes": ["*.ts"],
    "eventJSONPath": ["foobar"]
  },
  "errorLevel": "foo"
}

to replace the toplevel level matchers (includes, excludes, eventJSONPath, etc.) that existed before.

This will require enhanced JSON guards that can check types inside an object.

@cyamonide cyamonide added the 3.0 label Aug 23, 2020
@gagoar
Copy link
Owner

gagoar commented Aug 26, 2020

We could also do the same with eventJSONPath and split it into include excludes as well.

{
  "name": "foobar",
  "action": "comment",
  "matchers": {
    "includes": ["*.ts"],
    "eventJSONPath": {
       "includes": ["$.pull_request_body.match('Title')"],
       "excludes": ["$.sender.login.match(/*-bot/)"]
  }
  },
  "errorLevel": "foo"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants