LaraCopilot
LaraCopilot
API ReferenceEndpointsGitHub

Push project to GitHub

Pushes the current project code to GitHub. If repo details are provided, LaraCopilot checks whether the repository exists and creates it if missing before pushing. If repo details are omitted, the repository already linked to the project is used.

POST
/github/project/{projectId}/push
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://builder.laracopilot.com/api/v1/github/project/string/push" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "message": "Changes pushed to GitHub successfully.",
  "data": {
    "repo_url": "string",
    "github_login": "string",
    "branch": "string",
    "repo_created": true
  },
  "errors": null
}
{
  "success": true,
  "message": "Project not found.",
  "data": null,
  "errors": null
}
{
  "message": "string",
  "errors": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  }
}