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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-10 21:09:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-10 21:09:02 +0300
commit577bb49691b11bc8ebae3a4966153ed39af60d87 (patch)
treec34970de0f1fc58463448da0f34be13a2f3f47f9 /doc/api/repositories.md
parent6cffe9ea21d0974ebd3c544a3b711ffcd35649e2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/repositories.md')
-rw-r--r--doc/api/repositories.md25
1 files changed, 24 insertions, 1 deletions
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 25237c33383..11ef06c0f29 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -309,7 +309,7 @@ Supported attributes:
| Attribute | Type | Required | Description |
| :-------- | :------- | :--------- | :---------- |
| `version` | string | yes | The version to generate the changelog for. The format must follow [semantic versioning](https://semver.org/). |
-| `from` | string | yes | The start of the range of commits (as a SHA) to use for generating the changelog. This commit itself isn't included in the list. |
+| `from` | string | no | The start of the range of commits (as a SHA) to use for generating the changelog. This commit itself isn't included in the list. |
| `to` | string | yes | The end of the range of commits (as a SHA) to use for the changelog. This commit _is_ included in the list. |
| `date` | datetime | no | The date and time of the release, defaults to the current time. |
| `branch` | string | no | The branch to commit the changelog changes to, defaults to the project's default branch. |
@@ -317,6 +317,29 @@ Supported attributes:
| `file` | string | no | The file to commit the changes to, defaults to `CHANGELOG.md`. |
| `message` | string | no | The commit message to produce when committing the changes, defaults to `Add changelog for version X` where X is the value of the `version` argument. |
+If the `from` attribute is unspecified, GitLab uses the Git tag of the last
+version that came before the version specified in the `version` attribute. For
+this to work, your project must create Git tags for versions using the
+following format:
+
+```plaintext
+vX.Y.Z
+```
+
+Where `X.Y.Z` is a version that follows semantic versioning. For example,
+consider a project with the following tags:
+
+- v1.0.0
+- v1.1.0
+- v2.0.0
+
+If the `version` attribute is `2.1.0`, GitLab uses tag v2.0.0. And when the
+version is `1.1.1`, or `1.2.0`, GitLab uses tag v1.1.0.
+
+If `from` is unspecified and no tag to use is found, the API produces an error.
+To solve such an error, you must explicitly specify a value for the `from`
+attribute.
+
### How it works
Changelogs are generated based on commit titles. Commits are only included if