{
 "version": 1,
 "destinations": {
  "api": {
   "origin": "https://api.github.com",
   "network": "public"
  }
 },
 "credentials": {
  "primary": {
   "service_ref": "{{GITHUB_SERVICE_REF}}",
   "account_ref": "{{GITHUB_ACCOUNT_REF}}",
   "generation": 1
  }
 },
 "authentication": [
  {
   "id": "auth",
   "kind": "bearer",
   "credential": "primary"
  }
 ],
 "operations": {
  "repo_get": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {}
   },
   "response": {
    "format": "json"
   }
  },
  "branches_list": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/branches",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "per_page": {
      "type": "integer"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "per_page": {
     "parameter": "per_page"
    }
   }
  },
  "ref_get": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/ref/heads/{branch}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "branch": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "commits_list": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/commits",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "sha": {
      "type": "string"
     },
     "path": {
      "type": "string"
     },
     "per_page": {
      "type": "integer"
     },
     "page": {
      "type": "integer"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "sha": {
     "parameter": "sha"
    },
    "path": {
     "parameter": "path"
    },
    "per_page": {
     "parameter": "per_page"
    },
    "page": {
     "parameter": "page"
    }
   }
  },
  "commit_get": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/commits/{sha}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "sha": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "compare": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/compare/{basehead}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "basehead": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "git_commit_get": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/commits/{sha}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "sha": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "tree_get": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/trees/{tree_sha}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "tree_sha": {
      "type": "string",
      "required": true
     },
     "recursive": {
      "type": "string"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "recursive": {
     "parameter": "recursive"
    }
   }
  },
  "blob_get": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/blobs/{file_sha}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "file_sha": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "contents_get": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/contents/{path}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "path": {
      "type": "string",
      "required": true
     },
     "ref": {
      "type": "string"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "ref": {
     "parameter": "ref"
    }
   }
  },
  "status_get": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/commits/{sha}/status",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "sha": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "check_runs_get": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/commits/{sha}/check-runs",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "sha": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "pulls_list": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/pulls",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "state": {
      "type": "string"
     },
     "per_page": {
      "type": "integer"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "state": {
     "parameter": "state"
    },
    "per_page": {
     "parameter": "per_page"
    }
   }
  },
  "deployments_list": {
   "destination": "api",
   "method": "GET",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/deployments",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "per_page": {
      "type": "integer"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "per_page": {
     "parameter": "per_page"
    }
   }
  },
  "blob_create": {
   "destination": "api",
   "method": "POST",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/blobs",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "content": {
        "type": "string"
       },
       "encoding": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "tree_create": {
   "destination": "api",
   "method": "POST",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/trees",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "base_tree": {
        "type": "string"
       },
       "tree": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "path": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "sha": {
           "type": "string",
           "nullable": true
          },
          "content": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "commit_create": {
   "destination": "api",
   "method": "POST",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/commits",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "message": {
        "type": "string"
       },
       "tree": {
        "type": "string"
       },
       "parents": {
        "type": "array",
        "items": {
         "type": "string"
        }
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "ref_create": {
   "destination": "api",
   "method": "POST",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/refs",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "ref": {
        "type": "string"
       },
       "sha": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "ref_update": {
   "destination": "api",
   "method": "PATCH",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/refs/heads/{branch}",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "branch": {
      "type": "string",
      "required": true
     },
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "sha": {
        "type": "string"
       },
       "force": {
        "type": "boolean"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "contents_put": {
   "destination": "api",
   "method": "PUT",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/contents/{path}",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "path": {
      "type": "string",
      "required": true
     },
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "message": {
        "type": "string"
       },
       "content": {
        "type": "string"
       },
       "sha": {
        "type": "string"
       },
       "branch": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "pull_create": {
   "destination": "api",
   "method": "POST",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/pulls",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "title": {
        "type": "string"
       },
       "head": {
        "type": "string"
       },
       "base": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "pull_merge": {
   "destination": "api",
   "method": "PUT",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/pulls/{pull_number}/merge",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "pull_number": {
      "type": "integer",
      "required": true
     },
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "merge_method": {
        "type": "string"
       },
       "commit_title": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "merge": {
   "destination": "api",
   "method": "POST",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/merges",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "base": {
        "type": "string"
       },
       "head": {
        "type": "string"
       },
       "commit_message": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "ref_delete": {
   "destination": "api",
   "method": "DELETE",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/git/refs/heads/{branch}",
   "effect": "destructive",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "branch": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "contents_delete": {
   "destination": "api",
   "method": "DELETE",
   "path": "/repos/{{GITHUB_OWNER}}/{{GITHUB_REPO}}/contents/{path}",
   "effect": "destructive",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "path": {
      "type": "string",
      "required": true
     },
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "message": {
        "type": "string"
       },
       "sha": {
        "type": "string"
       },
       "branch": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  }
 }
}