UNPKG

@itentialopensource/adapter-git

Version:

Itential adapter to run git commands

316 lines (315 loc) 7.73 kB
{ "id": "@itentialopensource/adapter-git", "type": "Adapter", "export": "Git", "displayName": "Git", "title": "Git", "src": "adapter.js", "roles": [ "admin" ], "methods": [ { "name": "cloneRepo", "summary": "Clone a repository", "description": "Clone a repository", "input": [ { "name": "options", "type": "object", "info": "options to clone a repo", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/cloneRepo" }, "roles": [ "admin" ], "task": true }, { "name": "removeFile", "summary": "Remove a file from the git index (aka staging area)", "description": "Remove a file from the git index (aka staging area)", "input": [ { "name": "options", "type": "object", "info": "options to remove a file", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/removeFile" }, "roles": [ "admin" ], "task": true }, { "name": "addFile", "summary": "Add a file to the git index (aka staging area)", "description": "Add a file to the git index (aka staging area)", "input": [ { "name": "options", "type": "object", "info": "options to add a file", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/addFile" }, "roles": [ "admin" ], "task": true }, { "name": "getStatus", "summary": "Tell whether a file has been changed", "description": "Tell whether a file has been changed", "input": [ { "name": "options", "type": "object", "info": "options to get status", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/getStatus" }, "roles": [ "admin" ], "task": true }, { "name": "getStatusMatrix", "summary": "Efficiently get the status of multiple files at once.", "description": "Efficiently get the status of multiple files at once.", "input": [ { "name": "options", "type": "object", "info": "options to get status matrix", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/getStatusMatrix" }, "roles": [ "admin" ], "task": true }, { "name": "createCommit", "summary": "Create a new commit", "description": "Create a new commit", "input": [ { "name": "options", "type": "object", "info": "options to create a new commit", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/createCommit" }, "roles": [ "admin" ], "task": true }, { "name": "pushChanges", "summary": "Push a branch or tag", "description": "Push a branch or tag", "input": [ { "name": "options", "type": "object", "info": "options to push a branch or tag", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/pushChanges" }, "roles": [ "admin" ], "task": true }, { "name": "createBranch", "summary": "Create a branch", "description": "Create a branch", "input": [ { "name": "options", "type": "object", "info": "options to create a branch", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/createBranch" }, "roles": [ "admin" ], "task": true }, { "name": "checkoutBranch", "summary": "Checkout a branch", "description": "Checkout a branch", "input": [ { "name": "options", "type": "object", "info": "options to checkout a branch", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/checkoutBranch" }, "roles": [ "admin" ], "task": true }, { "name": "removeAndPushFile", "summary": "Clone the repo, checkout branch, remove a file, commit then push", "description": "Clone the repo, checkout branch, remove a file, commit then push", "input": [ { "name": "cloneOptions", "type": "object", "info": "options to clone a repo", "required": true }, { "name": "createAndCheckoutNewBranch", "type": "boolean", "info": "whether to create and checkout a new branch", "required": false }, { "name": "checkoutExistingBranch", "type": "boolean", "info": "whether to checkout an existing branch", "required": false }, { "name": "branchOptions", "type": "object", "info": "options to create a new branch", "required": false }, { "name": "checkoutOptions", "type": "object", "info": "options to checkout a branch", "required": false }, { "name": "removeFileOptions", "type": "object", "info": "options to remove a file", "required": true }, { "name": "commitOptions", "type": "object", "info": "options to create a new commit", "required": true }, { "name": "pushOptions", "type": "object", "info": "options to push a branch or tag", "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result" }, "route": { "verb": "POST", "path": "/removeAndPushFile" }, "roles": [ "admin" ], "task": true } ] }