summaryrefslogtreecommitdiff
path: root/doc/api/repositories.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/repositories.md')
-rw-r--r--doc/api/repositories.md20
1 files changed, 14 insertions, 6 deletions
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 9d464c94d99..1c9136d22ac 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -200,7 +200,8 @@ Example response:
"deleted_file": false
}],
"compare_timeout": false,
- "compare_same_ref": false
+ "compare_same_ref": false,
+ "web_url": "https://gitlab.example.com/thedude/gitlab-foss/-/compare/ae73cb07c9eeaf35924a10f713b364d32b2dd34f...0b4bc9a49b562e85de7cc9e834518ea6828729b9"
}
```
@@ -214,7 +215,7 @@ GET /projects/:id/repository/contributors
```
WARNING:
-The `additions` and `deletions` attributes are deprecated [as of GitLab 13.4](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39653), because they [always return `0`](https://gitlab.com/gitlab-org/gitlab/-/issues/233119).
+The `additions` and `deletions` attributes are [deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39653) as of GitLab 13.4, because they [always return `0`](https://gitlab.com/gitlab-org/gitlab/-/issues/233119).
Supported attributes:
@@ -447,6 +448,10 @@ You can set the following variables in this file:
- `template`: a custom template to use for generating the changelog data.
- `categories`: a hash that maps raw category names to the names to use in the
changelog.
+- `include_groups`: a list of group full paths containing users whose
+ contributions should be credited regardless of project membership. The user
+ generating the changelog must have access to each group or the members will
+ not be credited.
Using the default settings, generating a changelog results in a section along
the lines of the following:
@@ -507,7 +512,7 @@ follows:
{% each entries %}
- [{{ title }}]({{ commit.reference }})\
-{% if author.contributor %} by {{ author.reference }}{% end %}\
+{% if author.credit %} by {{ author.reference }}{% end %}\
{% if merge_request %} ([merge request]({{ merge_request.reference }})){% end %}
{% end %}
@@ -597,7 +602,7 @@ template: |
{% each entries %}
- [{{ title }}]({{ commit.reference }})\
- {% if author.contributor %} by {{ author.reference }}{% end %}
+ {% if author.credit %} by {{ author.reference }}{% end %}
{% end %}
@@ -633,8 +638,11 @@ In an entry, the following variables are available (here `foo.bar` means that
- `commit.trailers`: an object containing all the Git trailers that were present
in the commit body.
- `author.reference`: a reference to the commit author (for example, `@alice`).
-- `author.contributor`: a boolean set to `true` when the author is an external
- contributor, otherwise this is set to `false`.
+- `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
+ 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
introduced the change (for example, `gitlab-org/gitlab!50063`).