<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國際加速解決方案。 廣告
                # Tags API > 原文:[https://docs.gitlab.com/ee/api/tags.html](https://docs.gitlab.com/ee/api/tags.html) * [List project repository tags](#list-project-repository-tags) * [Get a single repository tag](#get-a-single-repository-tag) * [Create a new tag](#create-a-new-tag) * [Delete a tag](#delete-a-tag) * [Create a new release](#create-a-new-release) * [Update a release](#update-a-release) # Tags API[](#tags-api "Permalink") ## List project repository tags[](#list-project-repository-tags "Permalink") 從項目中獲取存儲庫標簽的列表,按名稱以相反的字母順序排序. 如果可公開訪問該存儲庫,則無需身份驗證即可訪問此端點. ``` GET /projects/:id/repository/tags ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `order_by` | string | no | 返回按`name`或`updated`字段排序的標簽. 默認值已`updated` | | `sort` | string | no | 返回按`asc`或`desc`順序排序的標簽. 默認為`desc` | | `search` | string | no | 返回符合搜索條件的標簽列表. 您可以使用`^term`和`term$`查找分別以`term`開頭和結尾的標簽. | 在 GitLab 11.8 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/54401)了對`search`支持. ``` [ { "commit": { "id": "2695effb5807a22ff3d138d593fd856244e155e7", "short_id": "2695effb", "title": "Initial commit", "created_at": "2017-07-26T11:08:53.000+02:00", "parent_ids": [ "2a4b78934375d7f53875269ffd4f45fd83a84ebe" ], "message": "Initial commit", "author_name": "John Smith", "author_email": "john@example.com", "authored_date": "2012-05-28T04:42:42-07:00", "committer_name": "Jack Smith", "committer_email": "jack@example.com", "committed_date": "2012-05-28T04:42:42-07:00" }, "release": { "tag_name": "1.0.0", "description": "Amazing release. Wow" }, "name": "v1.0.0", "target": "2695effb5807a22ff3d138d593fd856244e155e7", "message": null, "protected": true } ] ``` ## Get a single repository tag[](#get-a-single-repository-tag "Permalink") 獲取由其名稱確定的特定存儲庫標簽. 如果可公開訪問該存儲庫,則無需身份驗證即可訪問此端點. ``` GET /projects/:id/repository/tags/:tag_name ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `tag_name` | string | yes | 標簽名稱 | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/tags/v1.0.0" ``` 示例響應: ``` { "name": "v5.0.0", "message": null, "target": "60a8ff033665e1207714d6670fcd7b65304ec02f", "commit": { "id": "60a8ff033665e1207714d6670fcd7b65304ec02f", "short_id": "60a8ff03", "title": "Initial commit", "created_at": "2017-07-26T11:08:53.000+02:00", "parent_ids": [ "f61c062ff8bcbdb00e0a1b3317a91aed6ceee06b" ], "message": "v5.0.0\n", "author_name": "Arthur Verschaeve", "author_email": "contact@arthurverschaeve.be", "authored_date": "2015-02-01T21:56:31.000+01:00", "committer_name": "Arthur Verschaeve", "committer_email": "contact@arthurverschaeve.be", "committed_date": "2015-02-01T21:56:31.000+01:00" }, "release": null, "protected": false } ``` ## Create a new tag[](#create-a-new-tag "Permalink") 在存儲庫中創建一個新標簽,該標簽指向提供的參考. ``` POST /projects/:id/repository/tags ``` Parameters: * `id` (必填)-經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) * `tag_name` (必需)-標簽的名稱 * `ref` (必需)-使用提交 SHA,另一個標簽名稱或分支名稱創建標簽. * `message` (可選)-創建帶注釋的標簽. * `release_description` (可選)-將發行說明添加到 Git 標簽并將其存儲在 GitLab 數據庫中. ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/tags?tag_name=test&ref=master" ``` 響應示例: ``` { "commit": { "id": "2695effb5807a22ff3d138d593fd856244e155e7", "short_id": "2695effb", "title": "Initial commit", "created_at": "2017-07-26T11:08:53.000+02:00", "parent_ids": [ "2a4b78934375d7f53875269ffd4f45fd83a84ebe" ], "message": "Initial commit", "author_name": "John Smith", "author_email": "john@example.com", "authored_date": "2012-05-28T04:42:42-07:00", "committer_name": "Jack Smith", "committer_email": "jack@example.com", "committed_date": "2012-05-28T04:42:42-07:00" }, "release": { "tag_name": "1.0.0", "description": "Amazing release. Wow" }, "name": "v1.0.0", "target": "2695effb5807a22ff3d138d593fd856244e155e7", "message": null, "protected": false } ``` 創建輕量級標簽時,該消息將為`null` ,否則將包含注釋. 在創建帶注釋的標簽時,目標將包含標簽對象 ID,否則在創建輕量級標簽時將包含提交 ID. 如果出現錯誤,則返回帶有解釋性錯誤消息的狀態代碼`405` . ## Delete a tag[](#delete-a-tag "Permalink") 刪除具有給定名稱的存儲庫的標記. ``` DELETE /projects/:id/repository/tags/:tag_name ``` Parameters: * `id` (必填)-經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) * `tag_name` (必需)-標簽的名稱 ## Create a new release[](#create-a-new-release "Permalink") 將發行說明添加到現有的 Git 標簽. 如果給定標簽已經存在發行版,則返回狀態碼`409` . ``` POST /projects/:id/repository/tags/:tag_name/release ``` Parameters: * `id` (必填)-經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) * `tag_name` (必需)-標簽的名稱 要求正文: * `description` (必需)-具有 Markdown 支持的發行說明 ``` { "description": "Amazing release. Wow" } ``` Response: ``` { "tag_name": "1.0.0", "description": "Amazing release. Wow" } ``` ## Update a release[](#update-a-release "Permalink") 更新給定發行版的發行說明. ``` PUT /projects/:id/repository/tags/:tag_name/release ``` Parameters: * `id` (必填)-經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) * `tag_name` (必需)-標簽的名稱 要求正文: * `description` (必需)-具有 Markdown 支持的發行說明 ``` { "description": "Amazing release. Wow" } ``` Response: ``` { "tag_name": "1.0.0", "description": "Amazing release. Wow" } ```
                  <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>

                              哎呀哎呀视频在线观看