{"action":"created","issue":{"url":"https://api.github.com/repos/ewolfe/prlint/issues/75","repository_url":"https://api.github.com/repos/ewolfe/prlint","labels_url":"https://api.github.com/repos/ewolfe/prlint/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/ewolfe/prlint/issues/75/comments","events_url":"https://api.github.com/repos/ewolfe/prlint/issues/75/events","html_url":"https://github.com/ewolfe/prlint/issues/75","id":365750285,"node_id":"MDU6SXNzdWUzNjU3NTAyODU=","number":75,"title":"Expose comparison operators","user":{"login":"ewolfe","id":32533397,"node_id":"MDQ6VXNlcjMyNTMzMzk3","avatar_url":"https://avatars2.githubusercontent.com/u/32533397?v=4","gravatar_id":"","url":"https://api.github.com/users/ewolfe","html_url":"https://github.com/ewolfe","followers_url":"https://api.github.com/users/ewolfe/followers","following_url":"https://api.github.com/users/ewolfe/following{/other_user}","gists_url":"https://api.github.com/users/ewolfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ewolfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewolfe/subscriptions","organizations_url":"https://api.github.com/users/ewolfe/orgs","repos_url":"https://api.github.com/users/ewolfe/repos","events_url":"https://api.github.com/users/ewolfe/events{/privacy}","received_events_url":"https://api.github.com/users/ewolfe/received_events","type":"User","site_admin":false},"labels":[{"id":761576825,"node_id":"MDU6TGFiZWw3NjE1NzY4MjU=","url":"https://api.github.com/repos/ewolfe/prlint/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":761576827,"node_id":"MDU6TGFiZWw3NjE1NzY4Mjc=","url":"https://api.github.com/repos/ewolfe/prlint/labels/good%20first%20issue","name":"good first issue","color":"7057ff","default":true},{"id":761576826,"node_id":"MDU6TGFiZWw3NjE1NzY4MjY=","url":"https://api.github.com/repos/ewolfe/prlint/labels/help%20wanted","name":"help wanted","color":"33aa3f","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-02T05:51:00Z","updated_at":"2018-10-02T06:35:36Z","closed_at":null,"author_association":"OWNER","body":"Regular expressions are okay, but sometimes they don't cut it. For example:\r\n\r\n```json\r\n\"additions\": [\r\n  {\r\n    \"pattern\": \"0|^[1-9]$|^[1-9]\\\\d$\",\r\n    \"message\": \"Your PR is too big (over 99 additions)\"\r\n  }\r\n]\r\n```\r\n\r\nWould be better written as:\r\n\r\n```json\r\n\"additions\": [\r\n  {\r\n    \"less-than\": 99,\r\n    \"message\": \"Your PR is too big (over 99 additions)\"\r\n  }\r\n]\r\n```"},"comment":{"url":"https://api.github.com/repos/ewolfe/prlint/issues/comments/426164486","html_url":"https://github.com/ewolfe/prlint/issues/75#issuecomment-426164486","issue_url":"https://api.github.com/repos/ewolfe/prlint/issues/75","id":426164486,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjE2NDQ4Ng==","user":{"login":"ewolfe","id":32533397,"node_id":"MDQ6VXNlcjMyNTMzMzk3","avatar_url":"https://avatars2.githubusercontent.com/u/32533397?v=4","gravatar_id":"","url":"https://api.github.com/users/ewolfe","html_url":"https://github.com/ewolfe","followers_url":"https://api.github.com/users/ewolfe/followers","following_url":"https://api.github.com/users/ewolfe/following{/other_user}","gists_url":"https://api.github.com/users/ewolfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ewolfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewolfe/subscriptions","organizations_url":"https://api.github.com/users/ewolfe/orgs","repos_url":"https://api.github.com/users/ewolfe/repos","events_url":"https://api.github.com/users/ewolfe/events{/privacy}","received_events_url":"https://api.github.com/users/ewolfe/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T06:35:36Z","updated_at":"2018-10-02T06:35:36Z","author_association":"OWNER","body":"Another option would be to create a custom DSL to safely evaluate comparison operators. For example:\r\n\r\n- `\"comparison\":  \"$0 < 99\"`\r\n- `\"comparison\":  \"$0 == 'sample string'\"`\r\n- `\"comparison\":  \"$0 > 10 && $0 < 99\"`\r\n- `\"comparison\":  \"'wip' != $0\"`"}}
{"actor":{"display_login":"ewolfe"}}