add: contributors by filepath
This commit is contained in:
parent
ec22124004
commit
206bba1c49
|
@ -924,6 +924,71 @@ await octokit.request('GET /api/yystopf/csfjkkj/readme.json')
|
|||
Success Data.
|
||||
</aside>
|
||||
|
||||
## 获取仓库贡献者
|
||||
获取仓库贡献者
|
||||
|
||||
> 示例:
|
||||
|
||||
```shell
|
||||
curl -X GET \
|
||||
-d "ref=master" \
|
||||
-d "filepath=lib" \
|
||||
http://localhost:3000/api/yystopf/csfjkkj/contributors.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('GET /api/yystopf/csfjkkj/contributors.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`GET /api/:owner/:repo/contributors.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
--------- | ------- | ------- | -------- | ----------
|
||||
|owner |是| |string |用户登录名 |
|
||||
|repo |是| |string |项目标识identifier |
|
||||
|ref |否| | string |分支名称、tag名称或是提交记录id,默认为整个仓库 |
|
||||
|filepath |否| | string |子目录名称,默认为空 |
|
||||
|
||||
### 返回字段说明:
|
||||
参数 | 类型 | 字段说明
|
||||
--------- | ----------- | -----------
|
||||
|total_count |integer|贡献者数量|
|
||||
|contributions |integer|贡献数量|
|
||||
|login |string |用户登录名 |
|
||||
|type |string|用户类型 |
|
||||
|name |string|用户昵称|
|
||||
|image_url |string|用户头像|
|
||||
|
||||
|
||||
> 返回的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"contributors": [
|
||||
{
|
||||
"contributions": 5,
|
||||
"login": "testforge2",
|
||||
"type": "User",
|
||||
"name": "testforge2",
|
||||
"image_url": "system/lets/letter_avatars/2/T/236_177_85/120.png"
|
||||
},
|
||||
{
|
||||
"contributions": 79,
|
||||
"login": "yystopf",
|
||||
"type": "User",
|
||||
"name": "yystopf",
|
||||
"image_url": "system/lets/letter_avatars/2/Y/241_125_89/120.png"
|
||||
}
|
||||
],
|
||||
"total_count": 2
|
||||
}
|
||||
```
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
|
||||
|
||||
## 获取仓库webhooks列表
|
||||
获取仓库webhooks列表
|
||||
|
|
|
@ -502,6 +502,9 @@
|
|||
<li>
|
||||
<a href="#readme" class="toc-h2 toc-link" data-title="获取仓库README文件">获取仓库README文件</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#28d27a81d5" class="toc-h2 toc-link" data-title="获取仓库贡献者">获取仓库贡献者</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#webhooks" class="toc-h2 toc-link" data-title="获取仓库webhooks列表">获取仓库webhooks列表</a>
|
||||
</li>
|
||||
|
@ -7363,17 +7366,19 @@ http://localhost:3000/api/yystopf/csfjkkj/readme.json
|
|||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
<h2 id='webhooks'>获取仓库webhooks列表</h2>
|
||||
<p>获取仓库webhooks列表</p>
|
||||
<h2 id='28d27a81d5'>获取仓库贡献者</h2>
|
||||
<p>获取仓库贡献者</p>
|
||||
|
||||
<blockquote>
|
||||
<p>示例:</p>
|
||||
</blockquote>
|
||||
<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/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/yystopf/ceshi/webhooks.json</span><span class="dl">'</span><span class="p">)</span>
|
||||
<span class="nt">-d</span> <span class="s2">"ref=master"</span> <span class="se">\</span>
|
||||
<span class="nt">-d</span> <span class="s2">"filepath=lib"</span> <span class="se">\</span>
|
||||
http://localhost:3000/api/yystopf/csfjkkj/contributors.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/contributors.json</span><span class="dl">'</span><span class="p">)</span>
|
||||
</code></pre></div><h3 id='http-15'>HTTP 请求</h3>
|
||||
<p><code>GET /api/:owner/:repo/webhooks.json</code></p>
|
||||
<p><code>GET /api/:owner/:repo/contributors.json</code></p>
|
||||
<h3 id='2eb6f47757-15'>请求参数:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
|
@ -7398,6 +7403,20 @@ http://localhost:3000/api/yystopf/ceshi/webhooks.json
|
|||
<td>string</td>
|
||||
<td>项目标识identifier</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ref</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>分支名称、tag名称或是提交记录id,默认为整个仓库</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>filepath</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>子目录名称,默认为空</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<h3 id='7447e4874e-15'>返回字段说明:</h3>
|
||||
<table><thead>
|
||||
|
@ -7408,6 +7427,108 @@ http://localhost:3000/api/yystopf/ceshi/webhooks.json
|
|||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td>total_count</td>
|
||||
<td>integer</td>
|
||||
<td>贡献者数量</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>contributions</td>
|
||||
<td>integer</td>
|
||||
<td>贡献数量</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login</td>
|
||||
<td>string</td>
|
||||
<td>用户登录名</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>string</td>
|
||||
<td>用户类型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>string</td>
|
||||
<td>用户昵称</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>image_url</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">"contributors"</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">"contributions"</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">"login"</span><span class="p">:</span><span class="w"> </span><span class="s2">"testforge2"</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">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"testforge2"</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/T/236_177_85/120.png"</span><span class="w">
|
||||
</span><span class="p">},</span><span class="w">
|
||||
</span><span class="p">{</span><span class="w">
|
||||
</span><span class="nl">"contributions"</span><span class="p">:</span><span class="w"> </span><span class="mi">79</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">"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">"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">"image_url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"system/lets/letter_avatars/2/Y/241_125_89/120.png"</span><span class="w">
|
||||
</span><span class="p">}</span><span class="w">
|
||||
</span><span class="p">],</span><span class="w">
|
||||
</span><span class="nl">"total_count"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="w">
|
||||
</span><span class="p">}</span><span class="w">
|
||||
</span></code></pre></div>
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
<h2 id='webhooks'>获取仓库webhooks列表</h2>
|
||||
<p>获取仓库webhooks列表</p>
|
||||
|
||||
<blockquote>
|
||||
<p>示例:</p>
|
||||
</blockquote>
|
||||
<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/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/yystopf/ceshi/webhooks.json</span><span class="dl">'</span><span class="p">)</span>
|
||||
</code></pre></div><h3 id='http-16'>HTTP 请求</h3>
|
||||
<p><code>GET /api/:owner/:repo/webhooks.json</code></p>
|
||||
<h3 id='2eb6f47757-16'>请求参数:</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>
|
||||
</tbody></table>
|
||||
<h3 id='7447e4874e-16'>返回字段说明:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
<th>类型</th>
|
||||
<th>字段说明</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td>id</td>
|
||||
<td>int</td>
|
||||
<td>id</td>
|
||||
|
@ -7501,9 +7622,9 @@ http://localhost:3000/api/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/yystopf/ceshi/webhooks/3/edit.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/ceshi/webhooks/3/edit.json</span><span class="dl">'</span><span class="p">)</span>
|
||||
</code></pre></div><h3 id='http-16'>HTTP 请求</h3>
|
||||
</code></pre></div><h3 id='http-17'>HTTP 请求</h3>
|
||||
<p><code>GET /api/:owner/:repo/webhooks/:id/edit.json</code></p>
|
||||
<h3 id='2eb6f47757-16'>请求参数:</h3>
|
||||
<h3 id='2eb6f47757-17'>请求参数:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
|
@ -7535,7 +7656,7 @@ http://localhost:3000/api/yystopf/ceshi/webhooks/3/edit.json
|
|||
<td>webhook ID</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<h3 id='7447e4874e-16'>返回字段说明:</h3>
|
||||
<h3 id='7447e4874e-17'>返回字段说明:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
|
@ -7736,266 +7857,8 @@ http://localhost:3000/api/yystopf/ceshi/webhooks/3/edit.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/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/yystopf/ceshi/webhooks.json</span><span class="dl">'</span><span class="p">)</span>
|
||||
</code></pre></div><h3 id='http-17'>HTTP 请求</h3>
|
||||
<p><code>POST /api/:owner/:repo/webhooks.json</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>webhook.url</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>目标url</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.type</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>类型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.http_method</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>http方法, POST和GET</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.content_type</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>POST Content Type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.secret</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>密钥文本</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.active</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>bool</td>
|
||||
<td>是否激活</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.branch_filter</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>分支过滤</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.events</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>array</td>
|
||||
<td>触发事件</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<p>触发事件字段说明 </p>
|
||||
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
<th>含义</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td>create</td>
|
||||
<td>创建分支或标签</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>delete</td>
|
||||
<td>分支或标签删除</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fork</td>
|
||||
<td>仓库被fork</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>push</td>
|
||||
<td>git仓库推送</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue</td>
|
||||
<td>易修已打开、已关闭、已重新打开或编辑</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue_assign</td>
|
||||
<td>易修被指派</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue_label</td>
|
||||
<td>易修标签被更新或删除</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue_milestone</td>
|
||||
<td>易修被收入里程碑</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue_comment</td>
|
||||
<td>易修评论</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request</td>
|
||||
<td>合并请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_assign</td>
|
||||
<td>合并请求被指派</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_label</td>
|
||||
<td>合并请求被贴上标签</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_milestone</td>
|
||||
<td>合并请求被记录于里程碑中</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_comment</td>
|
||||
<td>合并请求被评论</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_review_approved</td>
|
||||
<td>合并请求被批准</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_review_rejected</td>
|
||||
<td>合并请求被拒绝</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_review_comment</td>
|
||||
<td>合并请求被提出审查意见</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_sync</td>
|
||||
<td>合并请求被同步</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>repository</td>
|
||||
<td>创建或删除仓库</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>release</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">"active"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"content_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"json"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"http_method"</span><span class="p">:</span><span class="w"> </span><span class="s2">"GET"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"secret"</span><span class="p">:</span><span class="w"> </span><span class="s2">"123456"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:10000"</span><span class="p">,</span><span class="w">
|
||||
</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-17'>返回字段说明:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
<th>类型</th>
|
||||
<th>字段说明</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td>id</td>
|
||||
<td>int</td>
|
||||
<td>id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>url</td>
|
||||
<td>string</td>
|
||||
<td>地址</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>content_type</td>
|
||||
<td>string</td>
|
||||
<td>POST Content Type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>is_active</td>
|
||||
<td>bool</td>
|
||||
<td>是否激活</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>string</td>
|
||||
<td>类型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>events</td>
|
||||
<td>array</td>
|
||||
<td>触发事件</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>create_time</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">"id"</span><span class="p">:</span><span class="w"> </span><span class="mi">18</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">"gitea"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"content_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"json"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:10000"</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="w">
|
||||
</span><span class="s2">"push"</span><span class="w">
|
||||
</span><span class="p">],</span><span class="w">
|
||||
</span><span class="nl">"active"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"create_time"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2021-07-26 18:53:43"</span><span class="w">
|
||||
</span><span class="p">}</span><span class="w">
|
||||
</span></code></pre></div>
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
<h2 id='webhook-3'>更新仓库webhook</h2>
|
||||
<p>更新仓库webhook</p>
|
||||
|
||||
<blockquote>
|
||||
<p>示例:</p>
|
||||
</blockquote>
|
||||
<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/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/yystopf/ceshi/webhooks/7.json</span><span class="dl">'</span><span class="p">)</span>
|
||||
</code></pre></div><h3 id='http-18'>HTTP 请求</h3>
|
||||
<p><code>PATCH /api/:owner/:repo/webhooks/:id.json</code></p>
|
||||
<p><code>POST /api/:owner/:repo/webhooks.json</code></p>
|
||||
<h3 id='2eb6f47757-18'>请求参数:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
|
@ -8021,13 +7884,6 @@ http://localhost:3000/api/yystopf/ceshi/webhooks/7.json
|
|||
<td>项目标识identifier</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>id</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>webhook id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.url</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
|
@ -8188,28 +8044,79 @@ http://localhost:3000/api/yystopf/ceshi/webhooks/7.json
|
|||
</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-18'>返回字段说明:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
<th>类型</th>
|
||||
<th>字段说明</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td>id</td>
|
||||
<td>int</td>
|
||||
<td>id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>url</td>
|
||||
<td>string</td>
|
||||
<td>地址</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>content_type</td>
|
||||
<td>string</td>
|
||||
<td>POST Content Type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>is_active</td>
|
||||
<td>bool</td>
|
||||
<td>是否激活</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>string</td>
|
||||
<td>类型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>events</td>
|
||||
<td>array</td>
|
||||
<td>触发事件</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>create_time</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">"status"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</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">"success"</span><span class="w">
|
||||
</span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="mi">18</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">"gitea"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"content_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"json"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:10000"</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="w">
|
||||
</span><span class="s2">"push"</span><span class="w">
|
||||
</span><span class="p">],</span><span class="w">
|
||||
</span><span class="nl">"active"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"create_time"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2021-07-26 18:53:43"</span><span class="w">
|
||||
</span><span class="p">}</span><span class="w">
|
||||
</span></code></pre></div>
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
<h2 id='webhook-4'>删除仓库webhook</h2>
|
||||
<p>删除仓库webhook</p>
|
||||
<h2 id='webhook-3'>更新仓库webhook</h2>
|
||||
<p>更新仓库webhook</p>
|
||||
|
||||
<blockquote>
|
||||
<p>示例:</p>
|
||||
</blockquote>
|
||||
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> DELETE <span class="se">\</span>
|
||||
<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/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/yystopf/ceshi/webhooks/7.json</span><span class="dl">'</span><span class="p">)</span>
|
||||
</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/yystopf/ceshi/webhooks/7.json</span><span class="dl">'</span><span class="p">)</span>
|
||||
</code></pre></div><h3 id='http-19'>HTTP 请求</h3>
|
||||
<p><code>DELETE /api/:owner/:repo/webhooks/:id.json</code></p>
|
||||
<p><code>PATCH /api/:owner/:repo/webhooks/:id.json</code></p>
|
||||
<h3 id='2eb6f47757-19'>请求参数:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
|
@ -8241,8 +8148,222 @@ http://localhost:3000/api/yystopf/ceshi/webhooks/7.json
|
|||
<td>string</td>
|
||||
<td>webhook id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.url</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>目标url</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.type</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>类型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.http_method</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>http方法, POST和GET</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.content_type</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>POST Content Type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.secret</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>密钥文本</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.active</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>bool</td>
|
||||
<td>是否激活</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.branch_filter</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>分支过滤</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>webhook.events</td>
|
||||
<td>否</td>
|
||||
<td></td>
|
||||
<td>array</td>
|
||||
<td>触发事件</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<h3 id='7447e4874e-19'>返回字段说明:</h3>
|
||||
|
||||
<p>触发事件字段说明 </p>
|
||||
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
<th>含义</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td>create</td>
|
||||
<td>创建分支或标签</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>delete</td>
|
||||
<td>分支或标签删除</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fork</td>
|
||||
<td>仓库被fork</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>push</td>
|
||||
<td>git仓库推送</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue</td>
|
||||
<td>易修已打开、已关闭、已重新打开或编辑</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue_assign</td>
|
||||
<td>易修被指派</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue_label</td>
|
||||
<td>易修标签被更新或删除</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue_milestone</td>
|
||||
<td>易修被收入里程碑</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>issue_comment</td>
|
||||
<td>易修评论</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request</td>
|
||||
<td>合并请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_assign</td>
|
||||
<td>合并请求被指派</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_label</td>
|
||||
<td>合并请求被贴上标签</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_milestone</td>
|
||||
<td>合并请求被记录于里程碑中</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_comment</td>
|
||||
<td>合并请求被评论</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_review_approved</td>
|
||||
<td>合并请求被批准</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_review_rejected</td>
|
||||
<td>合并请求被拒绝</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_review_comment</td>
|
||||
<td>合并请求被提出审查意见</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pull_request_sync</td>
|
||||
<td>合并请求被同步</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>repository</td>
|
||||
<td>创建或删除仓库</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>release</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">"active"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"content_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"json"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"http_method"</span><span class="p">:</span><span class="w"> </span><span class="s2">"GET"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"secret"</span><span class="p">:</span><span class="w"> </span><span class="s2">"123456"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:10000"</span><span class="p">,</span><span class="w">
|
||||
</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-19'>返回字段说明:</h3>
|
||||
<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">"status"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</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">"success"</span><span class="w">
|
||||
</span><span class="p">}</span><span class="w">
|
||||
</span></code></pre></div>
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
<h2 id='webhook-4'>删除仓库webhook</h2>
|
||||
<p>删除仓库webhook</p>
|
||||
|
||||
<blockquote>
|
||||
<p>示例:</p>
|
||||
</blockquote>
|
||||
<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/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/yystopf/ceshi/webhooks/7.json</span><span class="dl">'</span><span class="p">)</span>
|
||||
</code></pre></div><h3 id='http-20'>HTTP 请求</h3>
|
||||
<p><code>DELETE /api/:owner/:repo/webhooks/:id.json</code></p>
|
||||
<h3 id='2eb6f47757-20'>请求参数:</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>id</td>
|
||||
<td>是</td>
|
||||
<td></td>
|
||||
<td>string</td>
|
||||
<td>webhook id</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<h3 id='7447e4874e-20'>返回字段说明:</h3>
|
||||
<blockquote>
|
||||
<p>返回的JSON示例:</p>
|
||||
</blockquote>
|
||||
|
@ -8263,9 +8384,9 @@ http://localhost:3000/api/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/yystopf/ceshi/webhooks/3/tasks.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/ceshi/webhooks/3/tasks.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/:owner/:repo/webhooks/:id/tasks.json</code></p>
|
||||
<h3 id='2eb6f47757-20'>请求参数:</h3>
|
||||
<h3 id='2eb6f47757-21'>请求参数:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
|
@ -8297,7 +8418,7 @@ http://localhost:3000/api/yystopf/ceshi/webhooks/3/tasks.json
|
|||
<td>webhook ID</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<h3 id='7447e4874e-20'>返回字段说明:</h3>
|
||||
<h3 id='7447e4874e-21'>返回字段说明:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
|
@ -8534,9 +8655,9 @@ http://localhost:3000/api/yystopf/ceshi/webhooks/3/tasks.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/yystopf/ceshi/webhooks/3/test.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/yystopf/ceshi/webhooks/3/test.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>POST /api/:owner/:repo/webhooks/:id/test.json</code></p>
|
||||
<h3 id='2eb6f47757-21'>请求参数:</h3>
|
||||
<h3 id='2eb6f47757-22'>请求参数:</h3>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>参数</th>
|
||||
|
@ -8568,7 +8689,7 @@ http://localhost:3000/api/yystopf/ceshi/webhooks/3/test.json
|
|||
<td>webhook ID</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<h3 id='7447e4874e-21'>返回字段说明:</h3>
|
||||
<h3 id='7447e4874e-22'>返回字段说明:</h3>
|
||||
<blockquote>
|
||||
<p>返回的JSON示例:</p>
|
||||
</blockquote>
|
||||
|
|
Loading…
Reference in New Issue