Skip to content

overlane repo push

Commit files to a branch through the API

Updated View as MarkdownOpen in ChatGPTOpen in Claude

Commits the given files (and deletions) as one commit on a branch, for agents and clients without a git binary. The guardrail rules run on the server first: a protected branch takes changes through a pull request, an agent’s push to a protected branch waits for an approval, and a credential in a file is refused. With git installed, use overlane repo token and a normal push instead.

Usage

overlane repo push repo --branch NAME --message TEXT [--file PATH...] [--delete PATH...] [--expect SHA] [--rewrite] [--parent SHA] [--check] [--approval ID] [--dry-run]

Arguments

Argument Required Description
repo yes The repository name or ID

Flags

Flag Type Required Default Description
--branch string yes The branch to commit to
--message string yes The commit message
--file string (repeatable) no A text file to add or change; repeat for more
--delete string (repeatable) no A path to delete; repeat for more
--expect string no The commit the branch should be at (default: its current tip)
--rewrite boolean no Allow a history rewrite on an unprotected branch: the commit is built on –parent instead of the tip
--parent string no With –rewrite: the commit to build on (the orphaned commits become stale)
--check boolean no Only ask the guardrails whether this push would be allowed (protection, rules, approvals); commit nothing
--approval string no Run an action that an approval covers; get the ID from overlane guard approvals list
--dry-run boolean no Print the requests and file changes this command would make, then stop. Needs no credentials.

Examples

overlane repo push app --branch feature/login --message "Add login" --file src/login.ts
overlane repo push app --branch main --message "Fix" --file a.ts --dry-run
overlane repo push app --branch main --message "Fix" --file a.ts --check

Behavior

  • Effect: write (changes local or hosted state).
  • Needs credentials: yes. Uses the network: yes.
  • Supports --dry-run: yes. Accepts --force: no.
  • Machine-readable description: overlane schema repo push.

Result

With --json (the default when stdout is not a terminal) the command prints this JSON Schema’s shape on stdout.

{
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "tenantId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
              "description": "tenant identifier"
            },
            "repoId": {
              "type": "string",
              "pattern": "^repo_[A-Za-z0-9]{6,40}$"
            },
            "ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[A-Za-z0-9._/-]+$"
            },
            "before": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "after": {
              "type": "string",
              "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
            },
            "forced": {
              "type": "boolean"
            },
            "eventId": {
              "type": "string"
            },
            "sequence": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "replay": {
              "type": "boolean"
            }
          },
          "required": [
            "tenantId",
            "repoId",
            "ref",
            "before",
            "after",
            "forced",
            "eventId",
            "sequence",
            "replay"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "allowed": {
              "type": "boolean",
              "const": true
            }
          },
          "required": [
            "allowed"
          ],
          "additionalProperties": false
        }
      ]
    },
    {
      "type": "object",
      "properties": {
        "dryRun": {
          "type": "boolean",
          "const": true
        },
        "service": {
          "type": "string"
        },
        "requests": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "method": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "body": {},
              "note": {
                "type": "string"
              }
            },
            "required": [
              "method",
              "path"
            ],
            "additionalProperties": false
          }
        },
        "commands": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "writes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "action": {
                "type": "string",
                "enum": [
                  "write",
                  "append",
                  "delete"
                ]
              },
              "description": {
                "type": "string"
              }
            },
            "required": [
              "path",
              "action",
              "description"
            ],
            "additionalProperties": false
          }
        },
        "notes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "dryRun",
        "requests",
        "commands",
        "writes",
        "notes"
      ],
      "additionalProperties": false
    }
  ]
}

See exit codes for the status the process returns.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close

Overlane Agent

Ask about the docs. Answers are quoted from the pages, with links. This panel cannot change anything.

    Questions are answered in your browser from the docs index. Nothing you type here is stored or sent anywhere.