|
|
@ -453,11 +453,11 @@ curl -X GET http://localhost:3000/api/projects/3263 | jq
|
|
|
|
|
|
|
|
|
|
|
|
#### 修改项目信息
|
|
|
|
#### 修改项目信息
|
|
|
|
```
|
|
|
|
```
|
|
|
|
PUT api/projects/:id
|
|
|
|
PATCH api/projects/:id
|
|
|
|
```
|
|
|
|
```
|
|
|
|
*示例*
|
|
|
|
*示例*
|
|
|
|
```
|
|
|
|
```
|
|
|
|
curl -X PUT \
|
|
|
|
curl -X PATCH \
|
|
|
|
-d "name=hnfl_demo" \
|
|
|
|
-d "name=hnfl_demo" \
|
|
|
|
-d "description=my first project" \
|
|
|
|
-d "description=my first project" \
|
|
|
|
-d "repository_name=hnfl_demo" \
|
|
|
|
-d "repository_name=hnfl_demo" \
|
|
|
@ -720,7 +720,7 @@ http://localhost:3000/api/18816895620/mirror_demo/entries | jq
|
|
|
|
|name |string|文件夹或文件名称|
|
|
|
|
|name |string|文件夹或文件名称|
|
|
|
|
|path |string|文件夹或文件相对路径|
|
|
|
|
|path |string|文件夹或文件相对路径|
|
|
|
|
|type |string|文件类型, file:文件,dir:文件目录|
|
|
|
|
|type |string|文件类型, file:文件,dir:文件目录|
|
|
|
|
|size |int|文件夹或文件大小 单位KB|
|
|
|
|
|size |int|文件夹或文件大小 单位B|
|
|
|
|
|content |string|文件内容,|
|
|
|
|
|content |string|文件内容,|
|
|
|
|
|target |string|标签|
|
|
|
|
|target |string|标签|
|
|
|
|
|
|
|
|
|
|
|
@ -1284,7 +1284,14 @@ http://localhost:3000/api/18816895620/mirror_demo | jq
|
|
|
|
|praised |boolean|当前登录用户是否已点赞,true:已点赞,fasle:未点赞, 用户未登录状态为null|
|
|
|
|
|praised |boolean|当前登录用户是否已点赞,true:已点赞,fasle:未点赞, 用户未登录状态为null|
|
|
|
|
|watched |boolean|当前登录用户是否已关注,true:已关注,fasle:未关注, 用户未登录状态为null|
|
|
|
|
|watched |boolean|当前登录用户是否已关注,true:已关注,fasle:未关注, 用户未登录状态为null|
|
|
|
|
|permission |string|当前登录用户对该仓库的操作权限, Manager:管理员,可以在线编辑文件、在线新建文件、可以设置仓库的基本信息; Developer:开发人员,可在线编辑文件、在线新建文件、不能设置仓库信息; Reporter: 报告人员,只能查看信息,不能设置仓库信息、不能在线编辑文件、不能在线新建文件;用户未登录时也会返回Reporter, 说明也只有读取文件的权限 |
|
|
|
|
|permission |string|当前登录用户对该仓库的操作权限, Manager:管理员,可以在线编辑文件、在线新建文件、可以设置仓库的基本信息; Developer:开发人员,可在线编辑文件、在线新建文件、不能设置仓库信息; Reporter: 报告人员,只能查看信息,不能设置仓库信息、不能在线编辑文件、不能在线新建文件;用户未登录时也会返回Reporter, 说明也只有读取文件的权限 |
|
|
|
|
|
|
|
|
|size |int|仓库文件大小,单位:KB|
|
|
|
|
|mirror_url |string|镜像地址, 只有通过镜像过来的项目才会有这个地址|
|
|
|
|
|mirror_url |string|镜像地址, 只有通过镜像过来的项目才会有这个地址|
|
|
|
|
|
|
|
|
|ssh_url |string|仓库ssh地址|
|
|
|
|
|
|
|
|
|clone_url |string|仓库克隆地址|
|
|
|
|
|
|
|
|
|empty |boolean|仓库是否为空,true: 空仓库;false: 非空仓库|
|
|
|
|
|
|
|
|
|private |boolean|仓库是否私有,true: 私有仓库;fasle: 非私有的|
|
|
|
|
|
|
|
|
|default_branch |string|仓库默认分支|
|
|
|
|
|
|
|
|
|full_name |string|仓库全名(带用户名)|
|
|
|
|
|author |object|提交用户|
|
|
|
|
|author |object|提交用户|
|
|
|
|
|-- login |string|用户名称|
|
|
|
|
|-- login |string|用户名称|
|
|
|
|
|-- image_url |string|用户头像|
|
|
|
|
|-- image_url |string|用户头像|
|
|
|
@ -1293,18 +1300,26 @@ http://localhost:3000/api/18816895620/mirror_demo | jq
|
|
|
|
返回值
|
|
|
|
返回值
|
|
|
|
```
|
|
|
|
```
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
"identifier": "mirror_demo",
|
|
|
|
"project_id": 3263,
|
|
|
|
"project_id": 3263,
|
|
|
|
"project_identifier": "mirror_demo",
|
|
|
|
"project_identifier": "mirror_demo",
|
|
|
|
"identifier": "mirror_demo",
|
|
|
|
|
|
|
|
"praises_count": 1,
|
|
|
|
"praises_count": 1,
|
|
|
|
"forked_count": 0,
|
|
|
|
"forked_count": 0,
|
|
|
|
"watchers_count": 1,
|
|
|
|
"watchers_count": 1,
|
|
|
|
"branches_count": 6,
|
|
|
|
"branches_count": 6,
|
|
|
|
"commits_count": 105,
|
|
|
|
"commits_count": 107,
|
|
|
|
"permission": "Manager",
|
|
|
|
"permission": "Manager",
|
|
|
|
|
|
|
|
"mirror_url": "https://gitea.com/CasperVector/slew.git",
|
|
|
|
"watched": true,
|
|
|
|
"watched": true,
|
|
|
|
"praised": true,
|
|
|
|
"praised": true,
|
|
|
|
"mirror_url": "https://gitea.com/CasperVector/slew.git",
|
|
|
|
"size": 446,
|
|
|
|
|
|
|
|
"ssh_url": "jasder@localhost:18816895620/mirror_demo.git",
|
|
|
|
|
|
|
|
"clone_url": "http://localhost:3003/18816895620/mirror_demo.git",
|
|
|
|
|
|
|
|
"default_branch": "master",
|
|
|
|
|
|
|
|
"empty": false,
|
|
|
|
|
|
|
|
"full_name": "18816895620/mirror_demo",
|
|
|
|
|
|
|
|
"mirror": false,
|
|
|
|
|
|
|
|
"private": false,
|
|
|
|
"author": {
|
|
|
|
"author": {
|
|
|
|
"name": "18816895620",
|
|
|
|
"name": "18816895620",
|
|
|
|
"image_url": "avatars/User/b"
|
|
|
|
"image_url": "avatars/User/b"
|
|
|
|