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

migrationsSetLfsPreference

Update Git LFS preference

Details

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

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"
  },
  "use_lfs": {
    "description": "Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import.",
    "required": true,
    "location": "body",
    "type": "string",
    "enum": [
      "opt_in",
      "opt_out"
    ]
  }
}

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('migrationsSetLfsPreference', {
    # Add required parameters here
})