Browse Source

新增: 批量更改文件

pull/313/head
yystopf 3 years ago
parent
commit
25afedcdfd
10 changed files with 608 additions and 53 deletions
  1. +13
    -0
      app/controllers/api/v1/projects/contents_controller.rb
  2. +132
    -0
      app/docs/slate/source/includes/_repositories.md
  3. +1
    -1
      app/services/api/v1/projects/branches/create_service.rb
  4. +91
    -0
      app/services/api/v1/projects/contents/batch_create_service.rb
  5. +3
    -3
      app/views/api/v1/projects/blame.json.jbuilder
  6. +10
    -0
      app/views/api/v1/projects/commits/_simple_gitea_detail.json.jbuilder
  7. +1
    -1
      app/views/api/v1/projects/commits/index.json.jbuilder
  8. +14
    -0
      app/views/api/v1/projects/contents/batch.json.jbuilder
  9. +6
    -0
      config/routes/api.rb
  10. +337
    -48
      public/docs/api.html

+ 13
- 0
app/controllers/api/v1/projects/contents_controller.rb View File

@@ -0,0 +1,13 @@
class Api::V1::Projects::ContentsController < Api::V1::BaseController
before_action :require_operate_above, only: [:batch]

def batch
@result_object = Api::V1::Projects::Contents::BatchCreateService.call(@project, batch_content_params, current_user&.gitea_token)
puts @result_object
end

private
def batch_content_params
params.require(:content).permit(:author_email, :author_name, :author_timeunix, :branch, :committer_email, :committer_name, :committer_timeunix, :message, :new_branch, files: [ :action_type, :content, :encoding, :file_path])
end
end

+ 132
- 0
app/docs/slate/source/includes/_repositories.md View File

@@ -1093,6 +1093,138 @@ await octokit.request('GET /api/yystopf/ceshi/files.json')
]
```

## 提交文件到仓库
提交文件到仓库,支持批量

> 示例:

```shell
curl -X POST \
-d "files[][action_type]=create" \
-d "files[][content]=jfksj" \
-d "files[][encoding]=text" \
-d "files[][file_path]=heihei8" \
-d "author_email=yystopf@163.com" \
-d "author_name=yystopf" \
-d "author_timeunix=1658214400" \
-d "committer_email=yystopf@163.com" \
-d "committer_name=yystopf" \
-d "committer_timeunix=1658214400" \
-d "branch=develop" \
-d "new_branch=develop_ceshi" \
-d "message=测试提交" \
http://localhost:3000/api/v1/yystopf/ceshi/contents/batch.json
```

```javascript
await octokit.request('POST /api/v1/yystopf/ceshi/contents/batch.json')
```

### HTTP 请求
`POST /api/v1/:owner/:repo/contents/batch`

### 请求参数:
参数 | 必选 | 默认 | 类型 | 字段说明
--------- | ------- | ------- | -------- | ----------
|owner |是| |string |用户登录名 |
|repo |是| |string |项目标识identifier |
|files.action_type |是| |string|操作类型 create: 创建 update: 更新 delete: 删除|
|files.content |是| |string|文件内容|
|files.encoding |是| |string|文件编码方式 text 文本 base64 加密|
|files.file_path |是| |string|文件路径|
|author_email |是| |string|作者邮箱|
|author_name |是| |string|作者名称|
|author_timeunix |是| |int|编码时间,精确到秒|
|committer_email |是| |string|提交者邮箱|
|committer_name |是| |string|提交者名称|
|committer_timeunix|是| |int|提交时间戳,精确到秒|
|branch |是| |string|提交分支|
|new_branch |否| |string|如果需要创建新分支,这个需要填|
|message |是| |string|提交信息|

> 请求的JSON示例:

```json
{
"files": [
{
"action_type": "create",
"content": "jfksj",
"encoding": "text",
"file_path": "heihei7"
}
],
"author_email": "yystopf@163.com",
"author_name": "yystopf",
"author_timeunix": 1658214400,
"committer_email": "yystopf@163.com",
"committer_name": "yystopf",
"committer_timeunix": 1658214400,
"branch": "hh_ceshi",
"message": "测试提交"
}
```

### 返回字段说明:
参数 | 类型 | 字段说明
--------- | ----------- | -----------
|commit.sha |string |提交ID|
|commit.author |object |作者|
|commit.committer |object |提交者|
|commit.commit_message|string |提交信息|
|commit.parent_shas |array |父节点commit ID|
|commit.authored_time|int |编码时间|
|commit.commited_time|int |提交时间|
|contents.name |string |文件名称|
|contents.path |string |文件路径|
|contents.sha |string |文件标识|
|contents.type |string |文件类型|
|contents.size |int |文件大小|
|contents.url |string |文件地址|
|contents.encoding |string |编码类型 text 文本 base64 加密 |
|contents.content |string |文件内容|


> 返回的JSON示例:

```json
{
"commit": {
"sha": "7c1e25f9b974e4b7a3816bd7f5e49b441078e999",
"author": {
"id": "2",
"login": "yystopf",
"name": "heh",
"type": "User",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"committer": {
"id": "2",
"login": "yystopf",
"name": "heh",
"type": "User",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"commit_message": "测试提交\n",
"parent_shas": [
"9aec816d0f3600082ca77893290a14bd29d805fe"
],
"authored_time": 1658214400,
"commited_time": 1658214400
},
"contents": [
{
"name": "heihei7",
"path": "heihei7",
"sha": "f0acac8efb3021b0f6a7b13b42d033d86e076a4b",
"type": "file",
"size": 5,
"encoding": "base64",
"content": "amZrc2o="
}
]
}
```

## 获取仓库代码目录
获取仓库代码目录


+ 1
- 1
app/services/api/v1/projects/branches/create_service.rb View File

@@ -44,7 +44,7 @@ class Api::V1::Projects::Branches::CreateService < ApplicationService
end

def check_new_branch_exist
result = $gitea_client.get_repos_branch_name_set_by_owner_repo(owner, repo) rescue nil
result = $gitea_client.get_repos_branch_name_set_by_owner_repo(owner, repo, {query: request_params}) rescue nil
raise Error, '查询分支名称失败!' unless result.is_a?(Hash)
raise Error, '分支已存在!' if result['branch_name'].include?(@new_branch_name)
end

+ 91
- 0
app/services/api/v1/projects/contents/batch_create_service.rb View File

@@ -0,0 +1,91 @@
class Api::V1::Projects::Contents::BatchCreateService < ApplicationService
include ActiveModel::Model

attr_reader :project, :owner, :repo, :token
attr_reader :files, :author_email, :author_name, :author_timeunix, :branch, :committer_email, :committer_name, :committer_timeunix, :message, :new_branch
attr_accessor :gitea_data

validates :author_email, :committer_email, presence: true, format: { with: CustomRegexp::EMAIL }
validates :author_name, :committer_name, presence: true, format: { with: /\A(?!_)(?!.*?_$)[a-zA-Z0-9_-]{4,15}\z/ }
validates :author_timeunix, :committer_timeunix, presence: true
validates :branch, presence: true
validates :message, presence: true


def initialize(project, params, token=nil)
puts params
@project = project
@owner = project&.owner.login
@repo = project&.identifier
@token = token
@files = params[:files]
@author_email = params[:author_email]
@author_name = params[:author_name]
@author_timeunix = params[:author_timeunix]
@branch = params[:branch]
@committer_email = params[:committer_email]
@committer_name = params[:committer_name]
@committer_timeunix = params[:committer_timeunix]
@message = params[:message]
@new_branch = params[:new_branch]
end

def call
raise Error, '请输入正确的文件参数Files' unless valid_files?
raise Error, errors.full_messages.join(", ") unless valid?
check_branch_exist
excute_data_to_gitea

gitea_data
end

private
def request_params
{
access_token: token
}
end
def request_body
{
files: files,
header: {
author: {
email: author_email,
name: author_name
},
committer: {
email: committer_email,
name: committer_name
},
dates: {
author: Time.at(author_timeunix.to_i),
committer: Time.at(committer_timeunix.to_i)
},
message: message,
new_branch: new_branch,
signoff: false
}
}
end

def valid_files?
return false unless files.is_a?(Array) && !files.blank?
files.each do |file|
return false unless file.has_key?(:action_type) && file.has_key?(:content) && file.has_key?(:encoding) && file.has_key?(:file_path)
end
end

def excute_data_to_gitea
@gitea_data = $gitea_client.post_repos_contents_batch_by_owner_repo(owner, repo, {body: request_body.to_json, query: request_params}) rescue nil
raise Error, '创建文件失败!' unless @gitea_data.is_a?(Hash)
end

def check_branch_exist
result = $gitea_client.get_repos_branch_name_set_by_owner_repo(owner, repo, {query: request_params} ) rescue nil
raise Error, '查询分支名称失败!' unless result.is_a?(Hash)
raise Error, '分支不存在!' unless result['branch_name'].include?(branch)
raise Error, '分支已存在!' if result['branch_name'].include?(new_branch) && new_branch.nil?
end

end

+ 3
- 3
app/views/api/v1/projects/blame.json.jbuilder View File

@@ -12,9 +12,9 @@ json.blame_parts @result_object['blame_parts'] do |part|
json.partial! 'api/v1/users/commit_user', locals: { user: render_cache_commit_author(part['commit']['commiter']), name: part['commit']['commiter']['Name'] }
end
json.commit_message part['commit']['commit_message']
json.authored_time part['commit']['authored_time'].to_time.strftime("%Y-%m-%d %H:%M:%S")
json.committed_time part['commit']['committed_time'].to_time.strftime("%Y-%m-%d %H:%M:%S")
json.created_time part['commit']['created_time'].to_time.strftime("%Y-%m-%d %H:%M:%S")
json.authored_time render_unix_time(part['commit']['authored_time'])
json.committed_time render_unix_time(part['commit']['committed_time'])
json.created_time render_unix_time(part['commit']['created_time'])
end
json.current_number part['current_number']
json.effect_line part['effect_line']


+ 10
- 0
app/views/api/v1/projects/commits/_simple_gitea_detail.json.jbuilder View File

@@ -0,0 +1,10 @@
json.sha commit['sha']
json.author do
json.partial! 'api/v1/users/commit_user', locals: { user: render_cache_commit_author(commit['author']), name: commit['author']['name'] }
end

json.committer do
json.partial! 'api/v1/users/commit_user', locals: { user: render_cache_commit_author(commit['committer']), name: commit['committer']['name'] }
end
json.commit_message commit['message']
json.parent_shas commit['parents'].map{|x|x['sha']}

+ 1
- 1
app/views/api/v1/projects/commits/index.json.jbuilder View File

@@ -12,6 +12,6 @@ json.commits @result_object[:data].each do |commit|
json.parent_shas commit['parents'].map{|x|x['sha']}
json.files commit['files'].map{|f|f['filename']}
json.commit_date commit['commit_date']
json.commit_time commit['commit']['committer']['date'].to_time.strftime("%Y-%m-%d %H:%M:%S")
json.commit_time render_unix_time(commit['commit']['committer']['date'])
json.branch commit['branch']
end

+ 14
- 0
app/views/api/v1/projects/contents/batch.json.jbuilder View File

@@ -0,0 +1,14 @@
json.commit do
json.partial! "api/v1/projects/commits/simple_gitea_detail", commit: @result_object['commit']
json.authored_time render_unix_time(@result_object['commit']['author']['date'])
json.commited_time render_unix_time(@result_object['commit']['committer']['date'])
end
json.contents @result_object['contents'].each do |content|
json.name content['name']
json.path content['path']
json.sha content['sha']
json.type content['type']
json.size content['size']
json.encoding content['encoding']
json.content content['content']
end

+ 6
- 0
config/routes/api.rb View File

@@ -37,6 +37,12 @@ defaults format: :json do
get '/commits/:sha/diff', to: 'commits#diff'
get '/git/blobs/:sha', to: 'git#blobs'
get '/git/trees/:sha', to: 'git#trees'

resources :contents, only: [:index] do
collection do
post :batch
end
end
end
end



+ 337
- 48
public/docs/api.html View File

@@ -538,6 +538,9 @@
<li>
<a href="#59943eacca" class="toc-h2 toc-link" data-title="获取仓库所有文件">获取仓库所有文件</a>
</li>
<li>
<a href="#fc4df8ddd9" class="toc-h2 toc-link" data-title="提交文件到仓库">提交文件到仓库</a>
</li>
<li>
<a href="#0c98b4c01b" class="toc-h2 toc-link" data-title="获取仓库代码目录">获取仓库代码目录</a>
</li>
@@ -9056,6 +9059,292 @@ http://localhost:3000/api/yystopf/ceshi/files.json
</span><span class="nl">"html_url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:10080/yystopf/ceshi/src/branch/master/README.md"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div><h2 id='fc4df8ddd9'>提交文件到仓库</h2>
<p>提交文件到仓库,支持批量</p>

<blockquote>
<p>示例:</p>
</blockquote>
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> POST <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"files[][action_type]=create"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"files[][content]=jfksj"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"files[][encoding]=text"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"files[][file_path]=heihei8"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"author_email=yystopf@163.com"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"author_name=yystopf"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"author_timeunix=1658214400"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"committer_email=yystopf@163.com"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"committer_name=yystopf"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"committer_timeunix=1658214400"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"branch=develop"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"new_branch=develop_ceshi"</span> <span class="se">\</span>
<span class="nt">-d</span> <span class="s2">"message=测试提交"</span> <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/ceshi/contents/batch.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">POST /api/v1/yystopf/ceshi/contents/batch.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-17'>HTTP 请求</h3>
<p><code>POST /api/v1/:owner/:repo/contents/batch</code></p>
<h3 id='2eb6f47757-17'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
<th>必选</th>
<th>默认</th>
<th>类型</th>
<th>字段说明</th>
</tr>
</thead><tbody>
<tr>
<td>owner</td>
<td>是</td>
<td></td>
<td>string</td>
<td>用户登录名</td>
</tr>
<tr>
<td>repo</td>
<td>是</td>
<td></td>
<td>string</td>
<td>项目标识identifier</td>
</tr>
<tr>
<td>files.action_type</td>
<td>是</td>
<td></td>
<td>string</td>
<td>操作类型 create: 创建 update: 更新 delete: 删除</td>
</tr>
<tr>
<td>files.content</td>
<td>是</td>
<td></td>
<td>string</td>
<td>文件内容</td>
</tr>
<tr>
<td>files.encoding</td>
<td>是</td>
<td></td>
<td>string</td>
<td>文件编码方式 text 文本 base64 加密</td>
</tr>
<tr>
<td>files.file_path</td>
<td>是</td>
<td></td>
<td>string</td>
<td>文件路径</td>
</tr>
<tr>
<td>author_email</td>
<td>是</td>
<td></td>
<td>string</td>
<td>作者邮箱</td>
</tr>
<tr>
<td>author_name</td>
<td>是</td>
<td></td>
<td>string</td>
<td>作者名称</td>
</tr>
<tr>
<td>author_timeunix</td>
<td>是</td>
<td></td>
<td>int</td>
<td>编码时间,精确到秒</td>
</tr>
<tr>
<td>committer_email</td>
<td>是</td>
<td></td>
<td>string</td>
<td>提交者邮箱</td>
</tr>
<tr>
<td>committer_name</td>
<td>是</td>
<td></td>
<td>string</td>
<td>提交者名称</td>
</tr>
<tr>
<td>committer_timeunix</td>
<td>是</td>
<td></td>
<td>int</td>
<td>提交时间戳,精确到秒</td>
</tr>
<tr>
<td>branch</td>
<td>是</td>
<td></td>
<td>string</td>
<td>提交分支</td>
</tr>
<tr>
<td>new_branch</td>
<td>否</td>
<td></td>
<td>string</td>
<td>如果需要创建新分支,这个需要填</td>
</tr>
<tr>
<td>message</td>
<td>是</td>
<td></td>
<td>string</td>
<td>提交信息</td>
</tr>
</tbody></table>

<blockquote>
<p>请求的JSON示例:</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="w">
</span><span class="nl">"files"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nl">"action_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"create"</span><span class="p">,</span><span class="w">
</span><span class="nl">"content"</span><span class="p">:</span><span class="w"> </span><span class="s2">"jfksj"</span><span class="p">,</span><span class="w">
</span><span class="nl">"encoding"</span><span class="p">:</span><span class="w"> </span><span class="s2">"text"</span><span class="p">,</span><span class="w">
</span><span class="nl">"file_path"</span><span class="p">:</span><span class="w"> </span><span class="s2">"heihei7"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">],</span><span class="w">
</span><span class="nl">"author_email"</span><span class="p">:</span><span class="w"> </span><span class="s2">"yystopf@163.com"</span><span class="p">,</span><span class="w">
</span><span class="nl">"author_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"yystopf"</span><span class="p">,</span><span class="w">
</span><span class="nl">"author_timeunix"</span><span class="p">:</span><span class="w"> </span><span class="mi">1658214400</span><span class="p">,</span><span class="w">
</span><span class="nl">"committer_email"</span><span class="p">:</span><span class="w"> </span><span class="s2">"yystopf@163.com"</span><span class="p">,</span><span class="w">
</span><span class="nl">"committer_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"yystopf"</span><span class="p">,</span><span class="w">
</span><span class="nl">"committer_timeunix"</span><span class="p">:</span><span class="w"> </span><span class="mi">1658214400</span><span class="p">,</span><span class="w">
</span><span class="nl">"branch"</span><span class="p">:</span><span class="w"> </span><span class="s2">"hh_ceshi"</span><span class="p">,</span><span class="w">
</span><span class="nl">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"测试提交"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div><h3 id='7447e4874e-17'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>字段说明</th>
</tr>
</thead><tbody>
<tr>
<td>commit.sha</td>
<td>string</td>
<td>提交ID</td>
</tr>
<tr>
<td>commit.author</td>
<td>object</td>
<td>作者</td>
</tr>
<tr>
<td>commit.committer</td>
<td>object</td>
<td>提交者</td>
</tr>
<tr>
<td>commit.commit_message</td>
<td>string</td>
<td>提交信息</td>
</tr>
<tr>
<td>commit.parent_shas</td>
<td>array</td>
<td>父节点commit ID</td>
</tr>
<tr>
<td>commit.authored_time</td>
<td>int</td>
<td>编码时间</td>
</tr>
<tr>
<td>commit.commited_time</td>
<td>int</td>
<td>提交时间</td>
</tr>
<tr>
<td>contents.name</td>
<td>string</td>
<td>文件名称</td>
</tr>
<tr>
<td>contents.path</td>
<td>string</td>
<td>文件路径</td>
</tr>
<tr>
<td>contents.sha</td>
<td>string</td>
<td>文件标识</td>
</tr>
<tr>
<td>contents.type</td>
<td>string</td>
<td>文件类型</td>
</tr>
<tr>
<td>contents.size</td>
<td>int</td>
<td>文件大小</td>
</tr>
<tr>
<td>contents.url</td>
<td>string</td>
<td>文件地址</td>
</tr>
<tr>
<td>contents.encoding</td>
<td>string</td>
<td>编码类型 text 文本 base64 加密</td>
</tr>
<tr>
<td>contents.content</td>
<td>string</td>
<td>文件内容</td>
</tr>
</tbody></table>

<blockquote>
<p>返回的JSON示例:</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="w">
</span><span class="nl">"commit"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"sha"</span><span class="p">:</span><span class="w"> </span><span class="s2">"7c1e25f9b974e4b7a3816bd7f5e49b441078e999"</span><span class="p">,</span><span class="w">
</span><span class="nl">"author"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"login"</span><span class="p">:</span><span class="w"> </span><span class="s2">"yystopf"</span><span class="p">,</span><span class="w">
</span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"heh"</span><span class="p">,</span><span class="w">
</span><span class="nl">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"User"</span><span class="p">,</span><span class="w">
</span><span class="nl">"image_url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"system/lets/letter_avatars/2/H/188_239_142/120.png"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"committer"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"login"</span><span class="p">:</span><span class="w"> </span><span class="s2">"yystopf"</span><span class="p">,</span><span class="w">
</span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"heh"</span><span class="p">,</span><span class="w">
</span><span class="nl">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"User"</span><span class="p">,</span><span class="w">
</span><span class="nl">"image_url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"system/lets/letter_avatars/2/H/188_239_142/120.png"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"commit_message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"测试提交</span><span class="se">\n</span><span class="s2">"</span><span class="p">,</span><span class="w">
</span><span class="nl">"parent_shas"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="s2">"9aec816d0f3600082ca77893290a14bd29d805fe"</span><span class="w">
</span><span class="p">],</span><span class="w">
</span><span class="nl">"authored_time"</span><span class="p">:</span><span class="w"> </span><span class="mi">1658214400</span><span class="p">,</span><span class="w">
</span><span class="nl">"commited_time"</span><span class="p">:</span><span class="w"> </span><span class="mi">1658214400</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"contents"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"heihei7"</span><span class="p">,</span><span class="w">
</span><span class="nl">"path"</span><span class="p">:</span><span class="w"> </span><span class="s2">"heihei7"</span><span class="p">,</span><span class="w">
</span><span class="nl">"sha"</span><span class="p">:</span><span class="w"> </span><span class="s2">"f0acac8efb3021b0f6a7b13b42d033d86e076a4b"</span><span class="p">,</span><span class="w">
</span><span class="nl">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"file"</span><span class="p">,</span><span class="w">
</span><span class="nl">"size"</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w">
</span><span class="nl">"encoding"</span><span class="p">:</span><span class="w"> </span><span class="s2">"base64"</span><span class="p">,</span><span class="w">
</span><span class="nl">"content"</span><span class="p">:</span><span class="w"> </span><span class="s2">"amZrc2o="</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div><h2 id='0c98b4c01b'>获取仓库代码目录</h2>
<p>获取仓库代码目录</p>

@@ -9066,9 +9355,9 @@ http://localhost:3000/api/yystopf/ceshi/files.json
<span class="nt">-d</span> <span class="s2">"ref=develop"</span> <span class="se">\</span>
http://localhost:3000//api/jasder/jasder_test/entries.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/jasder/jasder_test/entries.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-17'>HTTP 请求</h3>
</code></pre></div><h3 id='http-18'>HTTP 请求</h3>
<p><code>GET /api/:owner/:repo/entries.json</code></p>
<h3 id='2eb6f47757-17'>请求参数:</h3>
<h3 id='2eb6f47757-18'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9100,7 +9389,7 @@ http://localhost:3000//api/jasder/jasder_test/entries.json
<td>分支名称、tag名称或是提交记录id,默认为master分支</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-17'>返回字段说明:</h3>
<h3 id='7447e4874e-18'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9214,9 +9503,9 @@ http://localhost:3000//api/jasder/jasder_test/entries.json
<span class="nt">-d</span> <span class="s2">"filepath=file"</span> <span class="se">\</span>
http://localhost:3000//api/jasder/jasder_test/sub_entries.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/jasder/jasder_test/sub_entries.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-18'>HTTP 请求</h3>
</code></pre></div><h3 id='http-19'>HTTP 请求</h3>
<p><code>GET /api/:owner/:repo/sub_entries.json</code></p>
<h3 id='2eb6f47757-18'>请求参数:</h3>
<h3 id='2eb6f47757-19'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9255,7 +9544,7 @@ http://localhost:3000//api/jasder/jasder_test/sub_entries.json
<td>分支名称、tag名称或是提交记录id,默认为master分支</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-18'>返回字段说明:</h3>
<h3 id='7447e4874e-19'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9352,9 +9641,9 @@ http://localhost:3000//api/jasder/jasder_test/sub_entries.json
<span class="nt">-d</span> <span class="s2">"filepath=lib"</span> <span class="se">\</span>
http://localhost:3000/api/yystopf/csfjkkj/readme.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/yystopf/csfjkkj/readme.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-19'>HTTP 请求</h3>
</code></pre></div><h3 id='http-20'>HTTP 请求</h3>
<p><code>GET /api/:owner/:repo/readme.json</code></p>
<h3 id='2eb6f47757-19'>请求参数:</h3>
<h3 id='2eb6f47757-20'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9393,7 +9682,7 @@ http://localhost:3000/api/yystopf/csfjkkj/readme.json
<td>子目录名称,默认为空</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-19'>返回字段说明:</h3>
<h3 id='7447e4874e-20'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9466,9 +9755,9 @@ http://localhost:3000/api/yystopf/csfjkkj/readme.json
<span class="nt">-d</span> <span class="s2">"limit=1"</span> <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/csfjkkj/git/trees/80dd40214a58622312393b2ae693756a4781fab2.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/v1/yystopf/csfjkkj/git/trees/80dd40214a58622312393b2ae693756a4781fab2.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-20'>HTTP 请求</h3>
</code></pre></div><h3 id='http-21'>HTTP 请求</h3>
<p><code>GET /api/v1/:owner/:repo/git/trees/:sha.json</code></p>
<h3 id='2eb6f47757-20'>请求参数:</h3>
<h3 id='2eb6f47757-21'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9521,7 +9810,7 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/git/trees/80dd40214a58622312393b2ae
<td>分页个数</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-20'>返回字段说明:</h3>
<h3 id='7447e4874e-21'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9594,9 +9883,9 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/git/trees/80dd40214a58622312393b2ae
</blockquote>
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> GET http://localhost:3000/api/v1/yystopf/csfjkkj/git/blobs/80dd40214a58622312393b2ae693756a4781fab2.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/v1/yystopf/csfjkkj/git/blobs/80dd40214a58622312393b2ae693756a4781fab2.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-21'>HTTP 请求</h3>
</code></pre></div><h3 id='http-22'>HTTP 请求</h3>
<p><code>GET /api/v1/:owner/:repo/git/blobs/:sha.json</code></p>
<h3 id='2eb6f47757-21'>请求参数:</h3>
<h3 id='2eb6f47757-22'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9628,7 +9917,7 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/git/trees/80dd40214a58622312393b2ae
<td>提交记录id</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-21'>返回字段说明:</h3>
<h3 id='7447e4874e-22'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9683,9 +9972,9 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/git/trees/80dd40214a58622312393b2ae
<span class="nt">-d</span> <span class="s2">"limit=1"</span> <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/csfjkkj/commits.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/v1/yystopf/csfjkkj/commits.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-22'>HTTP 请求</h3>
</code></pre></div><h3 id='http-23'>HTTP 请求</h3>
<p><code>GET /api/v1/:owner/:repo/commits.json</code></p>
<h3 id='2eb6f47757-22'>请求参数:</h3>
<h3 id='2eb6f47757-23'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9731,7 +10020,7 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/commits.json
<td>每页数量</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-22'>返回字段说明:</h3>
<h3 id='7447e4874e-23'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9838,9 +10127,9 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/commits.json
</blockquote>
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> GET http://localhost:3000/api/v1/yystopf/csfjkkj/commits/80dd40214a58622312393b2ae693756a4781fab2/diff.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/v1/yystopf/csfjkkj/commits/80dd40214a58622312393b2ae693756a4781fab2/diff.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-23'>HTTP 请求</h3>
</code></pre></div><h3 id='http-24'>HTTP 请求</h3>
<p><code>GET /api/v1/:owner/:repo/commits/:sha/diff.json</code></p>
<h3 id='2eb6f47757-23'>请求参数:</h3>
<h3 id='2eb6f47757-24'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -9872,7 +10161,7 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/commits.json
<td>提交记录id</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-23'>返回字段说明:</h3>
<h3 id='7447e4874e-24'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -10098,9 +10387,9 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/commits.json
<span class="nt">-d</span> <span class="s2">"filepath=hd.txt"</span> <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/csfjkkj/blame.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/v1/yystopf/csfjkkj/blame.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-24'>HTTP 请求</h3>
</code></pre></div><h3 id='http-25'>HTTP 请求</h3>
<p><code>GET /api/v1/:owner/:repo/blame.json</code></p>
<h3 id='2eb6f47757-24'>请求参数:</h3>
<h3 id='2eb6f47757-25'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -10139,7 +10428,7 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/blame.json
<td>文件路径</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-24'>返回字段说明:</h3>
<h3 id='7447e4874e-25'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -10355,9 +10644,9 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/blame.json
<span class="nt">-d</span> <span class="s2">"to=master"</span> <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/csfjkkj/compare.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/v1/yystopf/csfjkkj/compare.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-25'>HTTP 请求</h3>
</code></pre></div><h3 id='http-26'>HTTP 请求</h3>
<p><code>GET /api/v1/:owner/:repo/compare.json</code></p>
<h3 id='2eb6f47757-25'>请求参数:</h3>
<h3 id='2eb6f47757-26'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -10396,7 +10685,7 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/compare.json
<td>目标分支、标签、commitID</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-25'>返回字段说明:</h3>
<h3 id='7447e4874e-26'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -10681,9 +10970,9 @@ http://localhost:3000/api/v1/yystopf/csfjkkj/compare.json
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> GET <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/v1/yystopf/ceshi/webhooks.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-26'>HTTP 请求</h3>
</code></pre></div><h3 id='http-27'>HTTP 请求</h3>
<p><code>GET /api/v1/:owner/:repo/webhooks.json</code></p>
<h3 id='2eb6f47757-26'>请求参数:</h3>
<h3 id='2eb6f47757-27'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -10708,7 +10997,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
<td>项目标识identifier</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-26'>返回字段说明:</h3>
<h3 id='7447e4874e-27'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -10801,9 +11090,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> GET <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/v1/yystopf/ceshi/webhooks/3.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-27'>HTTP 请求</h3>
</code></pre></div><h3 id='http-28'>HTTP 请求</h3>
<p><code>GET /api/v1/:owner/:repo/webhooks/:id.json</code></p>
<h3 id='2eb6f47757-27'>请求参数:</h3>
<h3 id='2eb6f47757-28'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -10835,7 +11124,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3.json
<td>webhook ID</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-27'>返回字段说明:</h3>
<h3 id='7447e4874e-28'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -10958,9 +11247,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3.json
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> POST <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">POST /api/v1/yystopf/ceshi/webhooks.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-28'>HTTP 请求</h3>
</code></pre></div><h3 id='http-29'>HTTP 请求</h3>
<p><code>POST /api/v1/:owner/:repo/webhooks.json</code></p>
<h3 id='2eb6f47757-28'>请求参数:</h3>
<h3 id='2eb6f47757-29'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -11085,7 +11374,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
</span><span class="nl">"branch_filter"</span><span class="p">:</span><span class="w"> </span><span class="s2">"*"</span><span class="p">,</span><span class="w">
</span><span class="nl">"events"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"push"</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div><h3 id='7447e4874e-28'>返回字段说明:</h3>
</span></code></pre></div><h3 id='7447e4874e-29'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -11164,9 +11453,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> PATCH <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">PATCH /api/v1/yystopf/ceshi/webhooks/7.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-29'>HTTP 请求</h3>
</code></pre></div><h3 id='http-30'>HTTP 请求</h3>
<p><code>PATCH /api/v1/:owner/:repo/webhooks/68.json</code></p>
<h3 id='2eb6f47757-29'>请求参数:</h3>
<h3 id='2eb6f47757-30'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -11298,7 +11587,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
</span><span class="nl">"branch_filter"</span><span class="p">:</span><span class="w"> </span><span class="s2">"*"</span><span class="p">,</span><span class="w">
</span><span class="nl">"events"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"push"</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div><h3 id='7447e4874e-29'>返回字段说明:</h3>
</span></code></pre></div><h3 id='7447e4874e-30'>返回字段说明:</h3>
<blockquote>
<p>返回的JSON示例:</p>
</blockquote>
@@ -11333,9 +11622,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> DELETE <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">DELETE /api/v1/yystopf/ceshi/webhooks/7.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-30'>HTTP 请求</h3>
</code></pre></div><h3 id='http-31'>HTTP 请求</h3>
<p><code>DELETE /api/v1/:owner/:repo/webhooks/:id.json</code></p>
<h3 id='2eb6f47757-30'>请求参数:</h3>
<h3 id='2eb6f47757-31'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -11367,7 +11656,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
<td>webhook id</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-30'>返回字段说明:</h3>
<h3 id='7447e4874e-31'>返回字段说明:</h3>
<blockquote>
<p>返回的JSON示例:</p>
</blockquote>
@@ -11388,9 +11677,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> GET <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/hooktasks.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">GET /api/v1/yystopf/ceshi/webhooks/3/hooktasks.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-31'>HTTP 请求</h3>
</code></pre></div><h3 id='http-32'>HTTP 请求</h3>
<p><code>GET /api/v1/:owner/:repo/webhooks/:id/hooktasks.json</code></p>
<h3 id='2eb6f47757-31'>请求参数:</h3>
<h3 id='2eb6f47757-32'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -11422,7 +11711,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/hooktasks.json
<td>webhook ID</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-31'>返回字段说明:</h3>
<h3 id='7447e4874e-32'>返回字段说明:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -11659,9 +11948,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/hooktasks.json
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> POST <span class="se">\</span>
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/tests.json
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">POST /api/v1/yystopf/ceshi/webhooks/3/tests.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-32'>HTTP 请求</h3>
</code></pre></div><h3 id='http-33'>HTTP 请求</h3>
<p><code>POST /api/v1/:owner/:repo/webhooks/:id/tests.json</code></p>
<h3 id='2eb6f47757-32'>请求参数:</h3>
<h3 id='2eb6f47757-33'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
@@ -11693,7 +11982,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/tests.json
<td>webhook ID</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-32'>返回字段说明:</h3>
<h3 id='7447e4874e-33'>返回字段说明:</h3>
<blockquote>
<p>返回的JSON示例:</p>
</blockquote>


Loading…
Cancel
Save