snyk / broker

A broker system between a public service and a private service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drop JSON configs in favor of YAML

JackuB opened this issue · comments

My reason would be that JSON is more machine readable and we want these configs to be easier to audit. Compare this part of config:

{
  "public":
  [
      {
        "//": "used for pushing up webhooks from github",
        "method": "POST",
        "path": "/webhook/github",
        "valid": [
          {
            "//": "accept all pull request state changes (these don't have files in them)",
            "path": "pull_request.state",
            "value": "open"
          },
          {
            "path": "commits.*.added.*",
            "value": "package.json"
          },
          {
            "path": "commits.*.modified.*",
            "value": "package.json"
          },
          {
            "path": "commits.*.added.*",
            "value": ".snyk"
          },
          {
            "path": "commits.*.modified.*",
            "value": ".snyk"
          }
        ]
      }
  ]
}
public:
# used for pushing up webhooks from github
- method: POST
  path: "/webhook/github"
  valid:
  # accept all pull request state changes (these don't have files in them)
  - path: pull_request.state
    value: open
  - path: commits.*.added.*
    value: package.json
  - path: commits.*.modified.*
    value: package.json
  - path: commits.*.added.*
    value: ".snyk"
  - path: commits.*.modified.*
    value: ".snyk"

Thoughts?

No objection here, though I don't feel it's much of a priority.
If you wanted to do a PR, we wouldn't object.

Resolved by #10