Open Context Protocol is live! 🚀 Read the launch post
migrationsUpdateImport

migrationsUpdateImport

Update an import

Details

  • Method: PATCH
  • Path: /repos/{owner}/{repo}/import
  • Operation ID: migrations/update-import

Parameters

{
  "owner": {
    "description": "The account owner of the repository. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "repo": {
    "description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "vcs_username": {
    "description": "The username to provide to the originating repository.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "vcs_password": {
    "description": "The password to provide to the originating repository.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "vcs": {
    "description": "The type of version control system you are migrating from.",
    "required": false,
    "location": "body",
    "type": "string",
    "enum": [
      "subversion",
      "tfvc",
      "git",
      "mercurial"
    ]
  },
  "tfvc_project": {
    "description": "For a tfvc import, the name of the project that is being imported.",
    "required": false,
    "location": "body",
    "type": "string"
  }
}

Response Schema

{
  "title": "Import",
  "description": "A repository import from an external source.",
  "type": "object",
  "properties": {
    "vcs": {
      "type": "string",
      "nullable": true
    },
    "use_lfs": {
      "type": "boolean"
    },
    "vcs_url": {
      "description": "The URL of the originating repository.",
      "type": "string"
    },
    "svc_root": {
      "type": "string"
    },
    "tfvc_project": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "auth",
        "error",
        "none",
        "detecting",
        "choose",
        "auth_failed",
        "importing",
        "mapping",
        "waiting_to_push",
        "pushing",
        "complete",
        "setup",
        "unknown",
        "detection_found_multiple",
        "detection_found_nothing",
        "detection_needs_auth"
      ]
    },
    "status_text": {
      "type": "string",
      "nullable": true
    },
    "failed_step": {
      "type": "string",
      "nullable": true
    },
    "error_message": {
      "type": "string",
      "nullable": true
    },
    "import_percent": {
      "type": "integer",
      "nullable": true
    },
    "commit_count": {
      "type": "integer",
      "nullable": true
    },
    "push_percent": {
      "type": "integer",
      "nullable": true
    },
    "has_large_files": {
      "type": "boolean"
    },
    "large_files_size": {
      "type": "integer"
    },
    "large_files_count": {
      "type": "integer"
    },
    "project_choices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "vcs": {
            "type": "string"
          },
          "tfvc_project": {
            "type": "string"
          },
          "human_name": {
            "type": "string"
          }
        }
      }
    },
    "message": {
      "type": "string"
    },
    "authors_count": {
      "type": "integer",
      "nullable": true
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "html_url": {
      "type": "string",
      "format": "uri"
    },
    "authors_url": {
      "type": "string",
      "format": "uri"
    },
    "repository_url": {
      "type": "string",
      "format": "uri"
    },
    "svn_root": {
      "type": "string"
    }
  },
  "required": [
    "vcs",
    "vcs_url",
    "status",
    "url",
    "repository_url",
    "html_url",
    "authors_url"
  ]
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('github')

# Call this tool
result = await agent.call_tool('migrationsUpdateImport', {
    # Add required parameters here
})