<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Discussions API > 原文:[https://docs.gitlab.com/ee/api/discussions.html](https://docs.gitlab.com/ee/api/discussions.html) * [Discussions pagination](#discussions-pagination) * [Issues](#issues) * [List project issue discussion items](#list-project-issue-discussion-items) * [Get single issue discussion item](#get-single-issue-discussion-item) * [Create new issue thread](#create-new-issue-thread) * [Add note to existing issue thread](#add-note-to-existing-issue-thread) * [Modify existing issue thread note](#modify-existing-issue-thread-note) * [Delete an issue thread note](#delete-an-issue-thread-note) * [Snippets](#snippets) * [List project snippet discussion items](#list-project-snippet-discussion-items) * [Get single snippet discussion item](#get-single-snippet-discussion-item) * [Create new snippet thread](#create-new-snippet-thread) * [Add note to existing snippet thread](#add-note-to-existing-snippet-thread) * [Modify existing snippet thread note](#modify-existing-snippet-thread-note) * [Delete a snippet thread note](#delete-a-snippet-thread-note) * [Epics](#epics-ultimate) * [List group epic discussion items](#list-group-epic-discussion-items) * [Get single epic discussion item](#get-single-epic-discussion-item) * [Create new epic thread](#create-new-epic-thread) * [Add note to existing epic thread](#add-note-to-existing-epic-thread) * [Modify existing epic thread note](#modify-existing-epic-thread-note) * [Delete an epic thread note](#delete-an-epic-thread-note) * [Merge requests](#merge-requests) * [List project merge request discussion items](#list-project-merge-request-discussion-items) * [Get single merge request discussion item](#get-single-merge-request-discussion-item) * [Create new merge request thread](#create-new-merge-request-thread) * [Resolve a merge request thread](#resolve-a-merge-request-thread) * [Add note to existing merge request thread](#add-note-to-existing-merge-request-thread) * [Modify an existing merge request thread note](#modify-an-existing-merge-request-thread-note) * [Delete a merge request thread note](#delete-a-merge-request-thread-note) * [Commits](#commits) * [List project commit discussion items](#list-project-commit-discussion-items) * [Get single commit discussion item](#get-single-commit-discussion-item) * [Create new commit thread](#create-new-commit-thread) * [Add note to existing commit thread](#add-note-to-existing-commit-thread) * [Modify an existing commit thread note](#modify-an-existing-commit-thread-note) * [Delete a commit thread note](#delete-a-commit-thread-note) # Discussions API[](#discussions-api "Permalink") 討論是關于以下方面的一組相關注釋: * Snippets * Issues * Epics * 合并要求 * Commits 這包括系統注釋,這些注釋是有關對象更改的注釋(例如,當里程碑更改時,將有相應的系統注釋). 標簽注釋不是此 API 的一部分,而是在[資源標簽事件中](resource_label_events.html)記錄為單獨的[事件](resource_label_events.html) . ## Discussions pagination[](#discussions-pagination "Permalink") 默認情況下,因為 API 結果是分頁的,所以`GET`請求一次返回 20 個結果. 閱讀有關[分頁的](README.html#pagination)更多信息. ## Issues[](#issues "Permalink") ### List project issue discussion items[](#list-project-issue-discussion-items "Permalink") 獲取單個問題的所有討論項目的列表. ``` GET /projects/:id/issues/:issue_iid/discussions ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `issue_iid` | integer | yes | 問題的 IID | ``` [ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Issue", "noteable_iid": null }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Issue", "noteable_iid": null, "resolvable": false } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Issue", "noteable_iid": null, "resolvable": false } ] } ] ``` ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions" ``` ### Get single issue discussion item[](#get-single-issue-discussion-item "Permalink") 返回特定項目問題的單個討論項 ``` GET /projects/:id/issues/:issue_iid/discussions/:discussion_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `issue_iid` | integer | yes | 問題的 IID | | `discussion_id` | integer | yes | 討論項目的 ID | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7" ``` ### Create new issue thread[](#create-new-issue-thread "Permalink") 為單個項目問題創建一個新線程. 這類似于創建便箋,但其他注釋(回復)可以在以后添加. ``` POST /projects/:id/issues/:issue_iid/discussions ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `issue_iid` | integer | yes | 問題的 IID | | `body` | string | yes | 線程的內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions?body=comment" ``` ### Add note to existing issue thread[](#add-note-to-existing-issue-thread "Permalink") 向該線程添加新注釋. 這也可以[從單個注釋創建線程](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment) . **警告**注釋可以添加到注釋(系統注釋等)之外的其他項目中,從而使其成為主題. ``` POST /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `issue_iid` | integer | yes | 問題的 IID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | yes | 備注/回復的內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment" ``` ### Modify existing issue thread note[](#modify-existing-issue-thread-note "Permalink") 修改問題的現有線程注釋. ``` PUT /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `issue_iid` | integer | yes | 問題的 IID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | yes | 備注/回復的內容 | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment" ``` ### Delete an issue thread note[](#delete-an-issue-thread-note "Permalink") 刪除問題的現有主題注釋. ``` DELETE /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `issue_iid` | integer | yes | 問題的 IID | | `discussion_id` | integer | yes | 討論的 ID | | `note_id` | integer | yes | 討論記錄的 ID | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions/636" ``` ## Snippets[](#snippets "Permalink") ### List project snippet discussion items[](#list-project-snippet-discussion-items "Permalink") 獲取單個代碼段的所有討論項的列表. ``` GET /projects/:id/snippets/:snippet_id/discussions ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `snippet_id` | integer | yes | 片段的 ID | ``` [ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Snippet", "noteable_id": null }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Snippet", "noteable_id": null, "resolvable": false } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Snippet", "noteable_id": null, "resolvable": false } ] } ] ``` ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions" ``` ### Get single snippet discussion item[](#get-single-snippet-discussion-item "Permalink") 返回特定項目片段的單個討論項 ``` GET /projects/:id/snippets/:snippet_id/discussions/:discussion_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `snippet_id` | integer | yes | 片段的 ID | | `discussion_id` | integer | yes | 討論項目的 ID | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7" ``` ### Create new snippet thread[](#create-new-snippet-thread "Permalink") Creates a new thread to a single project snippet. This is similar to creating a note but other comments (replies) can be added to it later. ``` POST /projects/:id/snippets/:snippet_id/discussions ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `snippet_id` | integer | yes | 片段的 ID | | `body` | string | yes | 討論內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions?body=comment" ``` ### Add note to existing snippet thread[](#add-note-to-existing-snippet-thread "Permalink") 向該線程添加新注釋. ``` POST /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `snippet_id` | integer | yes | 片段的 ID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | yes | 備注/回復的內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment" ``` ### Modify existing snippet thread note[](#modify-existing-snippet-thread-note "Permalink") 修改代碼段的現有線程注釋. ``` PUT /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `snippet_id` | integer | yes | 片段的 ID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | yes | 備注/回復的內容 | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment" ``` ### Delete a snippet thread note[](#delete-a-snippet-thread-note "Permalink") 刪除代碼段的現有線程注釋. ``` DELETE /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `snippet_id` | integer | yes | 片段的 ID | | `discussion_id` | integer | yes | 討論的 ID | | `note_id` | integer | yes | 討論記錄的 ID | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/636" ``` ## Epics[](#epics-ultimate "Permalink") ### List group epic discussion items[](#list-group-epic-discussion-items "Permalink") 獲取單個史詩的所有討論項的列表. ``` GET /groups/:id/epics/:epic_id/discussions ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `epic_id` | integer | yes | 史詩的 ID | ``` [ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Epic", "noteable_id": null, "resolvable": false }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Epic", "noteable_id": null, "resolvable": false } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Epic", "noteable_id": null, "resolvable": false } ] } ] ``` ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions" ``` ### Get single epic discussion item[](#get-single-epic-discussion-item "Permalink") 返回特定小組史詩的單個討論項 ``` GET /groups/:id/epics/:epic_id/discussions/:discussion_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `epic_id` | integer | yes | 史詩的 ID | | `discussion_id` | integer | yes | 討論項目的 ID | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7" ``` ### Create new epic thread[](#create-new-epic-thread "Permalink") Creates a new thread to a single group epic. This is similar to creating a note but other comments (replies) can be added to it later. ``` POST /groups/:id/epics/:epic_id/discussions ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `epic_id` | integer | yes | 史詩的 ID | | `body` | string | yes | 線程的內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions?body=comment" ``` ### Add note to existing epic thread[](#add-note-to-existing-epic-thread "Permalink") 向該線程添加新注釋. 這也可以[從單個注釋創建線程](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment) . ``` POST /groups/:id/epics/:epic_id/discussions/:discussion_id/notes ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `epic_id` | integer | yes | 史詩的 ID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | yes | 備注/回復的內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment" ``` ### Modify existing epic thread note[](#modify-existing-epic-thread-note "Permalink") 修改史詩的現有線程注釋. ``` PUT /groups/:id/epics/:epic_id/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `epic_id` | integer | yes | 史詩的 ID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | yes | 備注/回復的內容 | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment" ``` ### Delete an epic thread note[](#delete-an-epic-thread-note "Permalink") 刪除史詩的現有主題注釋. ``` DELETE /groups/:id/epics/:epic_id/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `epic_id` | integer | yes | 史詩的 ID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions/636" ``` ## Merge requests[](#merge-requests "Permalink") ### List project merge request discussion items[](#list-project-merge-request-discussion-items "Permalink") 獲取單個合并請求的所有討論項的列表. ``` GET /projects/:id/merge_requests/:merge_request_iid/discussions ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `merge_request_iid` | integer | yes | 合并請求的 IID | ``` [ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Merge request", "noteable_iid": null, "resolved": false, "resolvable": true, "resolved_by": null }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Merge request", "noteable_iid": null, "resolved": false, "resolvable": true, "resolved_by": null } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Merge request", "noteable_iid": null, "resolved": false, "resolvable": true, "resolved_by": null } ] } ] ``` 差異評論還包含以下位置: ``` [ { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": false, "notes": [ { "id": 1128, "type": DiffNote, "body": "diff comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Merge request", "noteable_iid": null, "position": { "base_sha": "b5d6e7b1613fca24d250fa8e5bc7bcc3dd6002ef", "start_sha": "7c9c2ead8a320fb7ba0b4e234bd9529a2614e306", "head_sha": "4803c71e6b1833ca72b8b26ef2ecd5adc8a38031", "old_path": "package.json", "new_path": "package.json", "position_type": "text", "old_line": 27, "new_line": 27, "line_range": { "start": { "line_code": "588440f66559714280628a4f9799f0c4eb880a4a_10_10", "type": "new", }, "end": { "line_code": "588440f66559714280628a4f9799f0c4eb880a4a_11_11", "type": "old" }, } }, "resolved": false, "resolvable": true, "resolved_by": null } ] } ] ``` ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions" ``` ### Get single merge request discussion item[](#get-single-merge-request-discussion-item "Permalink") 返回特定項目合并請求的單個討論項 ``` GET /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `merge_request_iid` | integer | yes | 合并請求的 IID | | `discussion_id` | integer | yes | 討論項目的 ID | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7 ``` ### Create new merge request thread[](#create-new-merge-request-thread "Permalink") 為單個項目合并請求創建一個新線程. 這類似于創建便箋,但其他注釋(回復)可以在以后添加. ``` POST /projects/:id/merge_requests/:merge_request_iid/discussions ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `merge_request_iid` | integer | yes | 合并請求的 IID | | `body` | string | yes | 線程的內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | | `position` | hash | no | 創建差異注釋時的位置 | | `position[base_sha]` | string | yes | 源分支中的基本提交 SHA | | `position[start_sha]` | string | yes | SHA 引用目標分支中的提交 | | `position[head_sha]` | string | yes | SHA 引用此合并請求的 HEAD | | `position[position_type]` | string | yes | 位置參考的類型",允許的值:"文本"或"圖像" | | `position[new_path]` | string | no | 更改后的文件路徑 | | `position[new_line]` | integer | no | 更改后的行號(用于"文本"差異注釋) | | `position[old_path]` | string | no | 更改前的文件路徑 | | `position[old_line]` | integer | no | 更改前的行號(用于"文本"差異注釋) | | `position[line_range]` | hash | no | 多行差異注釋的行范圍 | | `position[line_range][start]` | hash | no | 多行音符起始行 | | `position[line_range][start][line_code]` | string | yes | 起始行的行代碼 | | `position[line_range][start][type]` | string | yes | 起始線的線型 | | `position[line_range][end]` | hash | no | 多行注釋結束行 | | `position[line_range][end][line_code]` | string | yes | 結束行的行代碼 | | `position[line_range][end][type]` | string | yes | 終點線的線型 | | `position[width]` | integer | no | 圖片寬度(用于"圖片"差異注釋) | | `position[height]` | integer | no | 圖片的高度(用于"圖片"差異注釋) | | `position[x]` | integer | no | X 坐標(用于"圖像"差異注釋) | | `position[y]` | integer | no | Y 坐標(用于"圖像"差異注釋) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions?body=comment" ``` ### Resolve a merge request thread[](#resolve-a-merge-request-thread "Permalink") 解決/取消解決合并請求的整個線程. ``` PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `merge_request_iid` | integer | yes | 合并請求的 IID | | `discussion_id` | integer | yes | 線程的 ID | | `resolved` | boolean | yes | 解決/取消討論 | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7?resolved=true" ``` ### Add note to existing merge request thread[](#add-note-to-existing-merge-request-thread "Permalink") 向該線程添加新注釋. 這也可以[從單個注釋創建線程](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment) . ``` POST /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `merge_request_iid` | integer | yes | 合并請求的 IID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | yes | 備注/回復的內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment" ``` ### Modify an existing merge request thread note[](#modify-an-existing-merge-request-thread-note "Permalink") 修改或解決合并請求的現有線程注釋. ``` PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `merge_request_iid` | integer | yes | 合并請求的 IID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | no | 備注/回復的內容(必須是`body`或已`resolved`的內容之一) | | `resolved` | boolean | no | 解析/取消解析音符(必須設置為剛好為`body`或已`resolved` | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment" ``` 解決注釋: ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?resolved=true" ``` ### Delete a merge request thread note[](#delete-a-merge-request-thread-note "Permalink") 刪除合并請求的現有線程注釋. ``` DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `merge_request_iid` | integer | yes | 合并請求的 IID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/636" ``` ## Commits[](#commits "Permalink") ### List project commit discussion items[](#list-project-commit-discussion-items "Permalink") 獲取單個提交的所有討論項的列表. ``` GET /projects/:id/commits/:commit_id/discussions ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `commit_id` | integer | yes | 提交的 ID | ``` [ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Commit", "noteable_iid": null, "resolvable": false }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Commit", "noteable_iid": null, "resolvable": false } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Commit", "noteable_iid": null, "resolvable": false } ] } ] ``` 差異評論還包含以下位置: ``` [ { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": false, "notes": [ { "id": 1128, "type": DiffNote, "body": "diff comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Commit", "noteable_iid": null, "position": { "base_sha": "b5d6e7b1613fca24d250fa8e5bc7bcc3dd6002ef", "start_sha": "7c9c2ead8a320fb7ba0b4e234bd9529a2614e306", "head_sha": "4803c71e6b1833ca72b8b26ef2ecd5adc8a38031", "old_path": "package.json", "new_path": "package.json", "position_type": "text", "old_line": 27, "new_line": 27 }, "resolvable": false } ] } ] ``` ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions" ``` ### Get single commit discussion item[](#get-single-commit-discussion-item "Permalink") 返回特定項目提交的單個討論項 ``` GET /projects/:id/commits/:commit_id/discussions/:discussion_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `commit_id` | integer | yes | 提交的 ID | | `discussion_id` | integer | yes | 討論項目的 ID | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7" ``` ### Create new commit thread[](#create-new-commit-thread "Permalink") 為單個項目提交創建一個新線程. 這類似于創建便箋,但其他注釋(回復)可以在以后添加. ``` POST /projects/:id/commits/:commit_id/discussions ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `commit_id` | integer | yes | 提交的 ID | | `body` | string | yes | 線程的內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | | `position` | hash | no | 創建差異注釋時的位置 | | `position[base_sha]` | string | yes | 源分支中的基本提交 SHA | | `position[start_sha]` | string | yes | SHA 引用目標分支中的提交 | | `position[head_sha]` | string | yes | SHA 引用此提交的 HEAD | | `position[position_type]` | string | yes | 位置參考的類型",允許的值:"文本"或"圖像" | | `position[new_path]` | string | no | 更改后的文件路徑 | | `position[new_line]` | integer | no | 變更后的行號 | | `position[old_path]` | string | no | 更改前的文件路徑 | | `position[old_line]` | integer | no | 更改前的行號 | | `position[width]` | integer | no | 圖片寬度(用于"圖片"差異注釋) | | `position[height]` | integer | no | 圖片的高度(用于"圖片"差異注釋) | | `position[x]` | integer | no | X 坐標(用于"圖像"差異注釋) | | `position[y]` | integer | no | Y 坐標(用于"圖像"差異注釋) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions?body=comment" ``` ### Add note to existing commit thread[](#add-note-to-existing-commit-thread "Permalink") 向該線程添加新注釋. ``` POST /projects/:id/commits/:commit_id/discussions/:discussion_id/notes ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `commit_id` | integer | yes | 提交的 ID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | yes | 備注/回復的內容 | | `created_at` | string | no | 日期時間字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理員或項目/組所有者權限) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment ``` ### Modify an existing commit thread note[](#modify-an-existing-commit-thread-note "Permalink") 修改或解決提交的現有線程注釋. ``` PUT /projects/:id/commits/:commit_id/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `commit_id` | integer | yes | 提交的 ID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | | `body` | string | no | 筆記內容 | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment" ``` 解決注釋: ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?resolved=true" ``` ### Delete a commit thread note[](#delete-a-commit-thread-note "Permalink") 刪除提交的現有線程注釋. ``` DELETE /projects/:id/commits/:commit_id/discussions/:discussion_id/notes/:note_id ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `commit_id` | integer | yes | 提交的 ID | | `discussion_id` | integer | yes | 線程的 ID | | `note_id` | integer | yes | 線程注釋的 ID | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/636" ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看