跳到主要内容

Fork a Repository

POST 

/api/v5/repos/:owner/:repo/forks

Request​

Path Parameters

    owner stringrequired

    Repository space address (address path of the enterprise, organization, or individual)

    repo stringrequired

    Repository path (path)

Query Parameters

    access_token stringrequired

    User authorization code

Body

    organizationstring

    Full address of the organizational space. If not filled, it defaults to forking to the user's personal space address.

    namestring

    Name of the repository after forking. Defaults to the source repository name.

    pathstring

    Forked repository address after forking. Default: Source repository address

Responses​

Successful Response

Response Headers
    Schema
      idinteger
      full_namestring
      human_namestring
      urlstring
      namespace object
      idinteger
      namestring
      pathstring
      develop_modestring
      cellstring
      kindstring
      full_pathstring
      full_namestring
      visibility_levelinteger
      enable_file_controlinteger