Gitlab目前暂时只支持git over https,同步私有repo时可以使用https://username@mirrors.sustech.edu.cn/git/username/repo_name作为URL;如果使用CAS注册了账户但不知道密码,可以自行至设置中更改;如有其他问题,请发邮件至service@cra.moe寻求协助。

Suggest Changes API (FREE)

This page describes the API for suggesting changes.

Every API call to suggestions must be authenticated.

Applying suggestions

Applies a suggested patch in a merge request. Users must be at least Developer to perform such action.

PUT /suggestions/:id/apply
Attribute Type Required Description
id integer/string yes The ID of a suggestion
commit_message string no A custom commit message to use instead of the default generated message or the project's default message
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/suggestions/5/apply"

Example response:

  {
    "id": 36,
    "from_line": 10,
    "to_line": 10,
    "appliable": false,
    "applied": true,
    "from_content": "        \"--talk-name=org.freedesktop.\",\n",
    "to_content": "        \"--talk-name=org.free.\",\n        \"--talk-name=org.desktop.\",\n"
  }