Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/repositories.md')
-rw-r--r--doc/api/repositories.md14
1 files changed, 12 insertions, 2 deletions
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 1c9136d22ac..e93ffbc5e72 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -14,6 +14,12 @@ be accessed without authentication if the repository is publicly accessible.
This command provides essentially the same functionality as the `git ls-tree` command. For more information, see the section _Tree Objects_ in the [Git internals documentation](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects/#_tree_objects).
+WARNING:
+This endpoint is changing to keyset-based pagination. Iterating pages of results
+with a number (`?page=2`) [is deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67509).
+Support for iterating with a number will become unsupported in GitLab 15.0. Use
+the new [keyset pagination system](index.md#keyset-based-pagination) instead.
+
```plaintext
GET /projects/:id/repository/tree
```
@@ -27,6 +33,8 @@ Supported attributes:
| `ref` | string | no | The name of a repository branch or tag or if not given the default branch. |
| `recursive` | boolean | no | Boolean value used to get a recursive tree (false by default). |
| `per_page` | integer | no | Number of results to show per page. If not specified, defaults to `20`. [Learn more on pagination](index.md#pagination). |
+| `pagination` | string | no | If set to `keyset`, use the new keyset pagination method. |
+| `page_token` | string | no | The tree record ID at which to fetch the next page. Used only with keyset pagination. |
```json
[
@@ -118,6 +126,7 @@ Supported attributes:
## Get file archive
> Support for [including Git LFS blobs](../topics/git/lfs/index.md#lfs-objects-in-project-archives) was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/15079) in GitLab 13.5.
+> Support for downloading a subfolder was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/28827) in GitLab 14.4.
Get an archive of the repository. This endpoint can be accessed without
authentication if the repository is publicly accessible.
@@ -139,11 +148,12 @@ Supported attributes:
|:------------|:---------------|:---------|:----------------------|
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `sha` | string | no | The commit SHA to download. A tag, branch reference, or SHA can be used. This defaults to the tip of the default branch if not specified. |
+| `path` | string | no | The subpath of the repository to download. This defaults to the whole repository (empty string). |
Example request:
```shell
-curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.com/api/v4/projects/<project_id>/repository/archive?sha=<commit_sha>"
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.com/api/v4/projects/<project_id>/repository/archive?sha=<commit_sha>&path=<path>"
```
## Compare branches, tags or commits
@@ -640,7 +650,7 @@ In an entry, the following variables are available (here `foo.bar` means that
- `author.reference`: a reference to the commit author (for example, `@alice`).
- `author.contributor`: a boolean set to `true` when the author is not a project
member, otherwise `false`.
-- `author.credit`: a boolean set to `true` when `author.contributor` is `true` or
+- `author.credit`: a boolean set to `true` when `author.contributor` is `true` or
when `include_groups` is configured, and the author is a member of one of the
groups.
- `merge_request.reference`: a reference to the merge request that first