{
  "repo": "pingcap/campaign",
  "binary": "gaday-contributors",
  "binary_path": "gaday/contributors/index.js",
  "dependencies": {
    "CLI node contributors/index.js": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "Always during execution"
          ],
          "operations": [
            {
              "operation": "WRITE FILE",
              "trigger": "Persist aggregated contributor data",
              "conditions": [
                "Aggregation completes"
              ],
              "implementation": "fs.writeFileSync('./contributors.json', JSON.stringify(aggr), 'utf8')"
            }
          ]
        }
      },
      "services": [
        {
          "name": "github-api",
          "target_repo": "external/github",
          "target_interface": "repos.getContributors / repos.getForUser / repos.getCommits",
          "operation_type": "http_api",
          "conditions": [
            "When fetching contributor lists or user email data"
          ],
          "operations": [
            {
              "operation": "CALL GITHUB API",
              "trigger": "Collect repo contributors and infer contributor emails",
              "conditions": [
                "CLI starts or getUserEmail() is invoked"
              ],
              "implementation": "github.repos.getContributors(...); github.repos.getForUser(...); github.repos.getCommits(...)"
            }
          ]
        }
      ]
    }
  }
}
