|  |  |  | @ -371,10 +371,10 @@ POST api/projects/migrate | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | curl -X POST \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "user_id=36401" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "clone_addr=https://gitee.com/openeuler/A-Tune.git" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "name=A-Tune" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "description=my first project" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "repository_name=mirror_demo" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "clone_addr=https://gitea.com/mx8090alex/golden.git" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "name=golden" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "description=golden" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "repository_name=golden" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "project_category_id=1" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "project_language_id=2" \ | 
			
		
	
		
			
				
					|  |  |  |  | http://localhost:3000/api/projects/migrate  | jq | 
			
		
	
	
		
			
				
					|  |  |  | @ -431,13 +431,22 @@ curl -X GET http://localhost:3000/api/projects/3263  | jq | 
			
		
	
		
			
				
					|  |  |  |  | -|-|- | 
			
		
	
		
			
				
					|  |  |  |  | |id             |int   |id | | 
			
		
	
		
			
				
					|  |  |  |  | |name           |string|项目名称| | 
			
		
	
		
			
				
					|  |  |  |  | |identifier     |string|项目标识| | 
			
		
	
		
			
				
					|  |  |  |  | |is_public      |boolean|项目是否公开, true:公开,false:私有| | 
			
		
	
		
			
				
					|  |  |  |  | |description    |string|项目简介| | 
			
		
	
		
			
				
					|  |  |  |  | |repo_id        |int|仓库id| | 
			
		
	
		
			
				
					|  |  |  |  | |repo_identifier|string|仓库标识| | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 返回值 | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | { | 
			
		
	
		
			
				
					|  |  |  |  |   "id": 3240, | 
			
		
	
		
			
				
					|  |  |  |  |   "name": "好项目" | 
			
		
	
		
			
				
					|  |  |  |  |   "name": "ni项目", | 
			
		
	
		
			
				
					|  |  |  |  |   "identifier": "mirror_demo", | 
			
		
	
		
			
				
					|  |  |  |  |   "is_public": true, | 
			
		
	
		
			
				
					|  |  |  |  |   "description": "my first project mirror_demo", | 
			
		
	
		
			
				
					|  |  |  |  |   "repo_id": 75073, | 
			
		
	
		
			
				
					|  |  |  |  |   "repo_identifier": "mirror_demo" | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | --- | 
			
		
	
	
		
			
				
					|  |  |  | @ -449,14 +458,11 @@ PUT api/projects/:id | 
			
		
	
		
			
				
					|  |  |  |  | *示例* | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | curl -X PUT \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "user_id=36401" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "name=hnfl_demo" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "description=my first project" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "repository_name=hnfl_demo" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "project_category_id=1" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "project_language_id=2" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "ignore_id=2" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "license_id=1" \ | 
			
		
	
		
			
				
					|  |  |  |  | http://localhost:3000/api/projects/3263  | jq | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | *请求参数说明:* | 
			
		
	
	
		
			
				
					|  |  |  | @ -495,8 +501,8 @@ POST api/projects/:id/members | 
			
		
	
		
			
				
					|  |  |  |  | *示例* | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | curl -X POST \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "user_id=36400" \ | 
			
		
	
		
			
				
					|  |  |  |  | http://localhost:3000/api/projects/3263/members  | jq | 
			
		
	
		
			
				
					|  |  |  |  | -d "user_id=36406" \ | 
			
		
	
		
			
				
					|  |  |  |  | http://localhost:3000/api/projects/3297/members  | jq | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | *请求参数说明:* | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -558,7 +564,7 @@ http://localhost:3000/api/projects/3263/members/remove  | jq | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | --- | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | #### 更改项目成员角色 | 
			
		
	
		
			
				
					|  |  |  |  | #### 更改项目成员角色/权限 | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | PUT api/projects/:id/members/change_role | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
	
		
			
				
					|  |  |  | @ -655,6 +661,38 @@ http://localhost:3000/api/projects/3263/members  | jq | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | --- | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | #### Fork项目 | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | POST /api/projects/:project_id/forks | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | *示例* | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | curl -X POST http://localhost:3000/api/projects/3297/forks  | jq | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | *请求参数说明:* | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | |参数名|必选|类型|说明| | 
			
		
	
		
			
				
					|  |  |  |  | -|-|-|- | 
			
		
	
		
			
				
					|  |  |  |  | |project_id        |是|int    |项目id  | | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | *返回参数说明:* | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | |参数名|类型|说明| | 
			
		
	
		
			
				
					|  |  |  |  | -|-|- | 
			
		
	
		
			
				
					|  |  |  |  | |id             |int   |项目id | | 
			
		
	
		
			
				
					|  |  |  |  | |identifier     |string|项目标识| | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 返回值 | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | { | 
			
		
	
		
			
				
					|  |  |  |  |   "id": 3290, | 
			
		
	
		
			
				
					|  |  |  |  |   "identifier": "newadm" | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | --- | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | #### 获取代码目录列表 | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | POST api/:login/:repo_identifier/entries | 
			
		
	
	
		
			
				
					|  |  |  | @ -731,7 +769,7 @@ GET api/:login/:repo_identifier/sub_entries | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | curl -X GET \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "ref=master" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "filepath=test1_create_file6.rb" \ | 
			
		
	
		
			
				
					|  |  |  |  | -d "filepath=test1_create_file.rb" \ | 
			
		
	
		
			
				
					|  |  |  |  | http://localhost:3000/api/18816895620/mirror_demo/sub_entries | jq | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | *请求参数说明:* | 
			
		
	
	
		
			
				
					|  |  |  | @ -1241,6 +1279,8 @@ http://localhost:3000/api/18816895620/mirror_demo | jq | 
			
		
	
		
			
				
					|  |  |  |  | |watchers_count  |int|关注数量| | 
			
		
	
		
			
				
					|  |  |  |  | |branches_count  |int|分支数量| | 
			
		
	
		
			
				
					|  |  |  |  | |commits_count   |int|总提交记录数量| | 
			
		
	
		
			
				
					|  |  |  |  | |permission      |string|当前登录用户对该仓库的操作权限, Manager:管理员,可以在线编辑文件、在线新建文件、可以设置仓库的基本信息; Developer:开发人员,可在线编辑文件、在线新建文件、不能设置仓库信息; Reporter: 报告人员,只能查看信息,不能设置仓库信息、不能在线编辑文件、不能在线新建文件;用户未登录时也会返回Reporter, 说明也只有读取文件的权限 | | 
			
		
	
		
			
				
					|  |  |  |  | |mirror_url      |string|镜像地址, 只有通过镜像过来的项目才会有这个地址| | 
			
		
	
		
			
				
					|  |  |  |  | |author          |object|提交用户| | 
			
		
	
		
			
				
					|  |  |  |  | |-- login        |string|用户名称| | 
			
		
	
		
			
				
					|  |  |  |  | |-- image_url    |string|用户头像| | 
			
		
	
	
		
			
				
					|  |  |  | @ -1250,11 +1290,13 @@ http://localhost:3000/api/18816895620/mirror_demo | jq | 
			
		
	
		
			
				
					|  |  |  |  | ``` | 
			
		
	
		
			
				
					|  |  |  |  | { | 
			
		
	
		
			
				
					|  |  |  |  |   "identifier": "mirror_demo", | 
			
		
	
		
			
				
					|  |  |  |  |   "praises_count": 0, | 
			
		
	
		
			
				
					|  |  |  |  |   "praises_count": 1, | 
			
		
	
		
			
				
					|  |  |  |  |   "forked_count": 0, | 
			
		
	
		
			
				
					|  |  |  |  |   "watchers_count": 0, | 
			
		
	
		
			
				
					|  |  |  |  |   "branches_count": 4, | 
			
		
	
		
			
				
					|  |  |  |  |   "commits_count": 81, | 
			
		
	
		
			
				
					|  |  |  |  |   "watchers_count": 1, | 
			
		
	
		
			
				
					|  |  |  |  |   "branches_count": 6, | 
			
		
	
		
			
				
					|  |  |  |  |   "commits_count": 105, | 
			
		
	
		
			
				
					|  |  |  |  |   "permission": "Manager", | 
			
		
	
		
			
				
					|  |  |  |  |   "mirror_url": "https://gitea.com/CasperVector/slew.git", | 
			
		
	
		
			
				
					|  |  |  |  |   "author": { | 
			
		
	
		
			
				
					|  |  |  |  |     "name": "18816895620", | 
			
		
	
		
			
				
					|  |  |  |  |     "image_url": "avatars/User/b" | 
			
		
	
	
		
			
				
					|  |  |  | 
 |