概述

  • 注册应用无需审核即可使用授权。
  • 采用 OAuth 2.0 协议认证。

接入

图片

1.1 开发者注册

账户 -> 应用管理页面添加应用,注册要接入 Coding 的应用。

图片

图片

其中回调地址是用户授权后,Coding 回调到应用,并且回传授权码的地址。

保存后,会返回到应用列表。

图片

此时再查看应用,会生成 client idclient secret

图片

保存 client idclient secret,以便后续认证使用。

1.2 授权流程

  • 将用户引导到 Coding 第三方登录页面上。如右侧:
  1. https://coding.net/oauth_authorize.html?client_id={client_id}
  2. &redirect_uri={redirect_uri}&response_type=code[&scope={scope}]
  • 如用户未登录 Coding,跳转到登录页面图片

  • 用户登录,并对应用请求的 scope 进行授权。图片

  • 授权通过,Coding 会将授权码回传给应用在 Coding 注册的回调地址http://xxx.com/callback?code=xxx),应用直接获取授权码 code 即可。图片

  • 应用向 Coding 的 Token Endpoint 发送请求:

  1. https://coding.net/api/oauth/access_token?client_id={client_id}&client_secret=
  2. {client_secret}&grant_type=authorization_code&code={code}

返回值 :

  1. { "expires_in": "271645", "refresh_token": "xxxxxx", "access_token":"xxxxxx" }

图片

参数

scope 名称说明授权
user授权获取用户信息(用户名称,头像,tag,email,动态 )
user:email授权获取用户的email )
notification授权读取通知信息,包含email通知读写
social授权读取冒泡列表,好友列表
social:tweet授权发送冒泡,冒泡操作(点赞、评论、删除)读写
social:message授权读取、发送私信、私信语音读写
project授权项目信息、项目列表,仓库信息,公钥列表、成员,任务列表
project:members授权项目管理者增、删、改项目成员,退出项目读写
project:task授权任务操作,包含增、删、改读写
project:file授权文件,包含增、删、改读写
project:depot获取 commit 信息,分支操作,MR/PR, LineNotes, fork, webhook 等操作读写
project:key授权操作部署公钥、个人公钥读写

2.1.0 用户信息

  1. GET /api/account/current_user

Response:

  1. {
  2. "code": 0,
  3. "data": {
  4. "tags_str": "云计算追随者, 技术风向标",
  5. "tags": "19,32",
  6. "job_str": "产品",
  7. "job": 2,
  8. "sex": 0,
  9. "phone": "18600000000",
  10. "birthday": "2014-07-16",
  11. "location": "广东 深圳 ",
  12. "company": "Coding.net",
  13. "slogan": "让开发更简单",
  14. "website": "",
  15. "introduction": "",
  16. "avatar": "https://dn-coding-net-avatar.qbox.me/89628160-f594-4e52-8c77-fda089fcc7dd.jpg",
  17. "gravatar": "https://dn-coding-net-avatar.qbox.me/89628160-f594-4e52-8c77-fda089fcc7dd.jpg",
  18. "lavatar": "https://dn-coding-net-avatar.qbox.me/89628160-f594-4e52-8c77-fda089fcc7dd.jpg",
  19. "created_at": 1399045779000,
  20. "last_logined_at": 1502121619000,
  21. "last_activity_at": 1502173432514,
  22. "global_key": "coding",
  23. "name": "coding",
  24. "name_pinyin": "coding",
  25. "updated_at": 1502121621000,
  26. "path": "/u/coding",
  27. "status": 1,
  28. "email": "coding@coding.net",
  29. "is_member": 0,
  30. "id": 93,
  31. "points_left": 0.44,
  32. "vip": 4,
  33. "vip_expired_at": 1502467200000,
  34. "skills": [
  35. {
  36. "skillName": "Java",
  37. "skillId": 1,
  38. "level": 4
  39. },
  40. {
  41. "skillName": "Ruby",
  42. "skillId": 3,
  43. "level": 3
  44. },
  45. {
  46. "skillName": "JavaScript",
  47. "skillId": 11,
  48. "level": 3
  49. }
  50. ],
  51. "degree": 3,
  52. "school": "",
  53. "follows_count": 83,
  54. "fans_count": 191,
  55. "tweets_count": 110,
  56. "phone_country_code": "+86",
  57. "country": "cn",
  58. "followed": false,
  59. "follow": false,
  60. "is_phone_validated": true,
  61. "email_validation": 1,
  62. "phone_validation": 1,
  63. "twofa_enabled": 1
  64. }
  65. }

2.2.0 发冒泡

  1. POST /api/social/tweet
表单字段数据类型说明
contentstring冒泡内容,必填
devicestring冒泡来源设备,选填
locationstring地点,选填
coordstring坐标,选填
addressaddress地址,选填

Response:

  1. {
  2. "code": 0,
  3. "data": {
  4. "id": 27020,
  5. "owner_id": 84337,
  6. "created_at": 1426585007031,
  7. "likes": 0,
  8. "comments": 0,
  9. "device": "",
  10. "location": "",
  11. "coord": "",
  12. "content": "<p>testing<img class=\"emotion emoji\" src=\"https://coding.net/static/emojis/grin.png\" title=\"grin\"><br> <a href=\"https://dn-coding-net-production-pp.qbox.me/f8338ca1-890c-4be2-bfda-a9eb890ab1b1.jpg\" target=\"_blank\" class=\"bubble-markdown-image-link\" rel=\"nofollow\"><img src=\"https://dn-coding-net-production-pp.qbox.me/f8338ca1-890c-4be2-bfda-a9eb890ab1b1.jpg\" alt=\"图片\" class=\" bubble-markdown-image\"></a></p>",
  13. "path": "/u/baoti/pp/27020",
  14. "activity_id": 0,
  15. "liked": false
  16. }
  17. }

2.3.0 用户的项目列表

  1. GET /api/user/projects

Response:

  1. {
  2. "code": 0,
  3. "data": {
  4. "page": 1,
  5. "pageSize": 100,
  6. "totalPage": 1,
  7. "totalRow": 2,
  8. "list": [
  9. {
  10. "created_at": 1426246044000,
  11. "backend_project_path": "/user/baoti/project/Coding-API",
  12. "description": "Coding 的 API 是啥样呢?瞧一瞧,看一看。\n注意:由于官方未提供 API 文档,此处 API 整理自 Coding-Android 项目源码。\n尚未对照 IOS 客户端源码。请前往演示, 或转至 http://coding-api.coding.io/ 以查看当前整理的 API.",
  13. "git_url": "git://coding.net/baoti/Coding-API.git",
  14. "ssh_url": "git@coding.net:baoti/Coding-API.git",
  15. "is_public": true,
  16. "https_url": "https://coding.net/baoti/Coding-API.git",
  17. "id": 67965,
  18. "name": "Coding-API",
  19. "owner_id": 84337,
  20. "owner_user_name": "baoti",
  21. "owner_user_picture": "/static/fruit_avatar/Fruit-2.png",
  22. "owner_user_home": "<a href=\"https://coding.net/u/baoti\">baoti</a>",
  23. "project_path": "/u/baoti/p/Coding-API",
  24. "status": 1,
  25. "type": 1,
  26. "updated_at": 1426576642885,
  27. "last_updated": 1426576630625,
  28. "fork_count": 0,
  29. "star_count": 2,
  30. "watch_count": 5,
  31. "pin": false,
  32. "depot_path": "/u/baoti/p/Coding-API/git",
  33. "forked": false,
  34. "un_read_activities_count": 0,
  35. "icon": "/static/project_icon/scenery-23.png",
  36. "current_user_role_id": 100,
  37. "current_user_role": "owner",
  38. "stared": false,
  39. "watched": false,
  40. "recommended": 1,
  41. "max_member": 10,
  42. "groupId": 0
  43. },
  44. {
  45. "created_at": 1426171134000,
  46. "backend_project_path": "/user/baoti/project/Coding-Android",
  47. "description": "Fork 自官方仓库,并添加了自己的修改分支",
  48. "git_url": "git://coding.net/baoti/Coding-Android.git",
  49. "ssh_url": "git@coding.net:baoti/Coding-Android.git",
  50. "is_public": true,
  51. "https_url": "https://coding.net/baoti/Coding-Android.git",
  52. "id": 67604,
  53. "name": "Coding-Android",
  54. "owner_id": 84337,
  55. "owner_user_name": "baoti",
  56. "owner_user_picture": "/static/fruit_avatar/Fruit-2.png",
  57. "owner_user_home": "<a href=\"https://coding.net/u/baoti\">baoti</a>",
  58. "project_path": "/u/baoti/p/Coding-Android",
  59. "status": 1,
  60. "type": 1,
  61. "updated_at": 1426485162000,
  62. "last_updated": 1426485163000,
  63. "fork_count": 307,
  64. "star_count": 0,
  65. "watch_count": 0,
  66. "pin": false,
  67. "depot_path": "/u/baoti/p/Coding-Android/git",
  68. "forked": true,
  69. "un_read_activities_count": 0,
  70. "icon": "/static/project_icon/scenery-17.png",
  71. "current_user_role_id": 100,
  72. "current_user_role": "owner",
  73. "stared": false,
  74. "watched": false,
  75. "recommended": 0,
  76. "max_member": 10,
  77. "groupId": 0,
  78. "parent_depot_path": "coding/Coding-Android"
  79. }
  80. ]
  81. }
  82. }

2.4.0 创建任务

  1. POST /api/user/{user_name}/project/{project_name}/task
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
表单字段数据类型说明
owner_idstring当前任务执行人的 id
priorityint任务优先级, 默认值为 1, 0 - 有空再看, 1 - 正常处理, 2 - 优先处理, 3 - 十万火急
deadlinestring任务完成期限, 选填
descriptionstring任务描述, 选填
contentstring任务内容, 选填

Response:

  1. {
  2. "code": 0
  3. }

2.4.1 根据 id 获取任务

  1. GET /api/user/{user_name}/project/{project_name}/task/{task_id}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
task_idint任务 id

Response:

  1. {
  2. "code": 0,
  3. "data": {
  4. "id": 123,
  5. "priority": 2,
  6. "comments": 0,
  7. "content": "",
  8. "created_at": 1426579942000,
  9. "creator": {
  10. "avatar": "/static/fruit_avatar/Fruit-15.png",
  11. "gravatar": "https://dn-coding-net-avatar.qbox.me/89628160-f594-4e52-8c77-fda089fcc7dd.jpg",
  12. "lavatar": "/static/fruit_avatar/Fruit-15.png",
  13. "global_key": "baoti",
  14. "name": "baoti",
  15. "id": 85544
  16. },
  17. "creator_id": 85544,
  18. "current_user_role_id": "2",
  19. "owner": {
  20. "avatar": "/static/fruit_avatar/Fruit-15.png",
  21. "gravatar": "https://dn-coding-net-avatar.qbox.me/89628160-f594-4e52-8c77-fda089fcc7dd.jpg",
  22. "lavatar": "/static/fruit_avatar/Fruit-15.png",
  23. "global_key": "baoti",
  24. "name": "baoti",
  25. "id": 85544
  26. },
  27. "owner_id": 85544,
  28. "project": {
  29. "id": 67965,
  30. "name": "Coding-API",
  31. "owner_id": 84337
  32. },
  33. "project_id": 67965,
  34. "status": 1,
  35. "updated_at": 1426579942000,
  36. "deadline": "",
  37. "has_description": true
  38. }
  39. }

2.4.2 根据 id 删除任务

  1. DELETE /api/user/{user_name}/project/{project_name}/task/{task_id}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
task_idint任务 id

Response:

  1. {
  2. "code": 0
  3. }

2.4.3 更新任务

  1. PUT /api/user/{user_name}/project/{project_name}/task/{task_id}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
task_idint任务 id
表单字段数据类型说明
contentstring任务内容, 可不填
statusshort任务内容, 1 - 进行中, 2 - 已完成, 可不填
owner_idint任务新执行者的 id, 可不填
descriptionstring任务描述, 可不填
priorityint任务优先级, 默认值为 1, 0 - 有空再看, 1 - 正常处理, 2 - 优先处理, 3 - 十万火急, 可不填
deadlinestring任务完成期限, 格式 "yyyy-MM-dd"

Response:

  1. {
  2. "code": 0
  3. }

2.4.4 获取用户某项目的任务列表

  1. GET /api/user/{user_name}/project/{project_name}/tasks/my/{task_status}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
task_statusstring任务状态, "all" - 获取所有任务, "processing" - 获取进行中的任务, "done" - 获取已完成的任务, "watch" - 获取关注的任务

Response:

  1. {
  2. "code": 0,
  3. "data": {
  4. "page": 1,
  5. "pageSize": 100,
  6. "totalPage": 1,
  7. "totalRow": 2,
  8. "list": [
  9. {
  10. "id": 123,
  11. "priority": 2,
  12. "comments": 0,
  13. "content": "",
  14. "created_at": 1426579942000,
  15. "creator": {
  16. "avatar": "/static/fruit_avatar/Fruit-15.png",
  17. "gravatar": "https://dn-coding-net-avatar.qbox.me/89628160-f594-4e52-8c77-fda089fcc7dd.jpg",
  18. "lavatar": "/static/fruit_avatar/Fruit-15.png",
  19. "global_key": "baoti",
  20. "name": "baoti",
  21. "id": 85544
  22. },
  23. "creator_id": 85544,
  24. "current_user_role_id": "2",
  25. "owner": {
  26. "avatar": "/static/fruit_avatar/Fruit-15.png",
  27. "gravatar": "https://dn-coding-net-avatar.qbox.me/89628160-f594-4e52-8c77-fda089fcc7dd.jpg",
  28. "lavatar": "/static/fruit_avatar/Fruit-15.png",
  29. "global_key": "baoti",
  30. "name": "baoti",
  31. "id": 85544
  32. },
  33. "owner_id": 85544,
  34. "project": {
  35. "id": 67965,
  36. "name": "Coding-API",
  37. "owner_id": 84337
  38. },
  39. "project_id": 67965,
  40. "status": 1,
  41. "updated_at": 1426579942000,
  42. "deadline": "",
  43. "has_description": true
  44. },
  45. {
  46. "id": 125,
  47. "priority": 2,
  48. "comments": 0,
  49. "content": "",
  50. "created_at": 1426579942000,
  51. "creator": {
  52. "avatar": "/static/fruit_avatar/Fruit-15.png",
  53. "gravatar": "https://dn-coding-net-avatar.qbox.me/89628160-f594-4e52-8c77-fda089fcc7dd.jpg",
  54. "lavatar": "/static/fruit_avatar/Fruit-15.png",
  55. "global_key": "baoti",
  56. "name": "baoti",
  57. "id": 85544
  58. },
  59. "creator_id": 85544,
  60. "current_user_role_id": "2",
  61. "owner": {
  62. "avatar": "/static/fruit_avatar/Fruit-15.png",
  63. "gravatar": "https://dn-coding-net-avatar.qbox.me/89628160-f594-4e52-8c77-fda089fcc7dd.jpg",
  64. "lavatar": "/static/fruit_avatar/Fruit-15.png",
  65. "global_key": "baoti",
  66. "name": "baoti",
  67. "id": 85544
  68. },
  69. "owner_id": 85544,
  70. "project": {
  71. "id": 67965,
  72. "name": "Coding-API",
  73. "owner_id": 84337
  74. },
  75. "project_id": 67965,
  76. "status": 1,
  77. "updated_at": 1426579942000,
  78. "deadline": "",
  79. "has_description": true
  80. }
  81. ]
  82. }
  83. }

2.5.0 webhook 列表

  1. GET /api/user/{user_name}/project/{project_name}/git/hooks
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称

Response:

  1. {
  2. "code": 0,
  3. "data": [
  4. {
  5. "depot_id": 20658,
  6. "hook_url": "http://abc.coding.net",
  7. "type": 1,
  8. "token": "",
  9. "status": 0,
  10. "created_at": 1431511538877,
  11. "updated_at": 1431511538877,
  12. "send_type": 3,
  13. "id": 174
  14. },
  15. {
  16. "depot_id": 20658,
  17. "hook_url": "https://api-doc.coding.io",
  18. "type": 1,
  19. "token": "hjklzxcqaw3422345",
  20. "status": 0,
  21. "created_at": 1431511574722,
  22. "updated_at": 1431511574722,
  23. "send_type": 3,
  24. "id": 175
  25. }
  26. ]
  27. }

2.5.1 增加 webhook

  1. POST /api/user/{user_name}/project/{project_name}/git/hook/{hook_id}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
表单字段数据类型说明
hook_urlstringwebhook 链接
tokenstring自定义 webhook 秘钥
type_pushbooleanpush代码 通知开关
type_mr_prbooleanMR/PR 通知开关
type_topicboolean发布讨论 通知开关
type_memberboolean成员变动 通知开关
type_commentboolean发表评论 通知开关
type_documentboolean文档 通知开关
type_watchboolean项目被关注 通知开关
type_starboolean项目被加星 通知开关
type_taskboolean项目任务 通知开关

Response:

  1. {
  2. "code": 0
  3. }

2.5.2 获取 webhook

  1. GET /api/user/{user_name}/project/{project_name}/git/hook/{hook_id}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
hook_idintwebhook id

Response:

  1. {
  2. "code": 0,
  3. "data": {
  4. "depot_id": 20658,
  5. "hook_url": "http://abc.coding.net",
  6. "type": 1,
  7. "token": "",
  8. "status": 0,
  9. "created_at": 1431511538877,
  10. "updated_at": 1431511538877,
  11. "send_type": 3,
  12. "id": 174
  13. }
  14. }

2.5.3 编辑 webhook

  1. PUT /api/user/{user_name}/project/{project_name}/git/hook/{hook_id}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
hook_idintwebhook id
表单字段数据类型说明
hook_urlstringwebhook 链接
tokenstring自定义 webhook 秘钥
type_pushbooleanpush代码 通知开关
type_mr_prbooleanMR/PR 通知开关
type_topicboolean发布讨论 通知开关
type_memberboolean成员变动 通知开关
type_commentboolean发表评论 通知开关
type_documentboolean文档 通知开关
type_watchboolean项目被关注 通知开关
type_starboolean项目被加星 通知开关
type_taskboolean项目任务 通知开关

Response:

  1. {
  2. "code": 0
  3. }

2.5.4 删除 webhook

  1. DELETE /api/user/{user_name}/project/{project_name}/git/hook/{hook_id}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
hook_idintwebhook id

Response:

  1. {
  2. "code": 0
  3. }

2.6.0 从 branch 名称查询 commit sha

  1. GET /api/user/{user_name}/project/{project_name}/git/tree/{branch_name}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
branch_namestring分支名称

Response:

  1. {
  2. "code": 0,
  3. "data": {
  4. "ref": "master",
  5. "lastCommitter": {
  6. "name": "ZXX_ABC",
  7. "email": "kcccss111@gmail.com",
  8. "avatar": "https://dn-coding-net-production-static.qbox.me/0174e523-963b-4cfb-a2ef-d4f0efea3465.jpg?imageMogr2/auto-orient/format/jpeg/crop/!128x128a0a0",
  9. "link": "/u/zxx_sse"
  10. },
  11. "files": [
  12. {
  13. "mode": "file",
  14. "path": "README.md",
  15. "name": "README.md",
  16. "flatten_path": "README.md"
  17. }
  18. ],
  19. "can_edit": true,
  20. "isHead": true,
  21. "headCommit": {
  22. "fullMessage": "new file abc.md",
  23. "shortMessage": "new file abc.md\n",
  24. "allMessage": "",
  25. "commitId": "8a305b5304a0eab0c58ea861dbb1b760a72ea9a8",
  26. "commitTime": 1431057342000,
  27. "committer": {
  28. "name": "ZXX_ABC",
  29. "email": "kcccss111@gmail.com",
  30. "avatar": "https://dn-coding-net-production-static.qbox.me/0174e523-963b-4cfb-a2ef-d4f0efea3465.jpg?imageMogr2/auto-orient/format/jpeg/crop/!128x128a0a0",
  31. "link": "/u/zxx_sse"
  32. },
  33. "notesCount": 0
  34. },
  35. "readme": {
  36. "data": "#abcawerq\n",
  37. "lang": "markdown",
  38. "size": 10,
  39. "previewed": true,
  40. "preview": "<h1>abcawerq</h1>",
  41. "lastCommitMessage": "Initial commit\n",
  42. "lastCommitDate": 1431057300000,
  43. "lastCommitId": "48b65a3b85ab65974f4d64da0f27d7e757561198",
  44. "lastCommitter": {
  45. "name": "ZXX_ABC",
  46. "email": "kcccss111@gmail.com",
  47. "avatar": "https://dn-coding-net-production-static.qbox.me/0174e523-963b-4cfb-a2ef-d4f0efea3465.jpg?imageMogr2/auto-orient/format/jpeg/crop/!128x128a0a0",
  48. "link": "/u/zxx_sse"
  49. },
  50. "mode": "file",
  51. "path": "README.md",
  52. "name": "README.md",
  53. "flatten_path": "README.md"
  54. },
  55. "lastCommit": {
  56. "fullMessage": "new file abc.md",
  57. "shortMessage": "new file abc.md\n",
  58. "allMessage": "",
  59. "commitId": "8a305b5304a0eab0c58ea861dbb1b760a72ea9a8",
  60. "commitTime": 1431057342000,
  61. "committer": {
  62. "name": "ZXX_ABC",
  63. "email": "kcccss111@gmail.com",
  64. "avatar": "https://dn-coding-net-production-static.qbox.me/0174e523-963b-4cfb-a2ef-d4f0efea3465.jpg?imageMogr2/auto-orient/format/jpeg/crop/!128x128a0a0",
  65. "link": "/u/zxx_sse"
  66. },
  67. "notesCount": 0
  68. }
  69. }
  70. }

2.7.0 添加部署公钥

  1. POST /api/user/{user_name}/project/{project_name}/git/deploy_key
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
表单字段数据类型说明
titlestring公钥名
contentstring公钥内容

Response:

  1. {
  2. "code": 0,
  3. "data": {
  4. "id": 2781,
  5. "owner_id": 31828,
  6. "content": "ssh-rsa qwertyuiopas...... qwertyuiopasdfghjkl",
  7. "finger_print": "ef:03:d4:9d:d3:7d:bb:6d:ac:c3:99:9a:10:a9:32:4d",
  8. "type": "deploy",
  9. "title": "coding-abc",
  10. "created_at": 1431509572347
  11. }
  12. }

2.8.0 读取 repo 某个文件

  1. GET /api/user/{user_name}/project/{project_name}/git/blob/{branch_name}/{file_path}
参数数据类型说明
user_namestring项目所有者在 Coding 的用户名,即 global_key
project_namestring项目名称
branch_namestring分支名称
file_pathstring文件在 repo 中的路径 ( 包含文件名 )

Response:

  1. {
  2. "code": 0,
  3. "data": {
  4. "ref": "master",
  5. "file": {
  6. "data": "hello world!!!", //文件内容
  7. "lang": "",
  8. "size": 14,
  9. "previewed": false,
  10. "lastCommitMessage": "new hello file\n",
  11. "lastCommitDate": 1500350251000,
  12. "lastCommitId": "899c1a848a1eaa8e925fa1aeaef084447f4e7673",
  13. "lastCommitter": {
  14. "name": "Coding",
  15. "email": "coding@coding.net",
  16. "avatar": "https://dn-coding-net-production-static.qbox.me/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
  17. "link": "/u/coding"
  18. },
  19. "mode": "file",
  20. "path": "hello",
  21. "name": "hello"
  22. },
  23. "isHead": true,
  24. "can_edit": false,
  25. "headCommit": {
  26. "fullMessage": "new hello file",
  27. "shortMessage": "new hello file\n",
  28. "allMessage": "",
  29. "commitId": "52545e0a252f79b62a46f54dc087b0719ffa641b",
  30. "commitTime": 1502101718000,
  31. "committer": {
  32. "name": "Coding",
  33. "email": "coding@coding.net",
  34. "avatar": "https://dn-coding-net-production-static.qbox.me/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
  35. "link": "/u/coding"
  36. },
  37. "notesCount": 0
  38. }
  39. }
  40. }