diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-22 21:10:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-22 21:10:55 +0300 |
commit | 39cc8695fc20e17f4989fa99aa9fafc00f9e2953 (patch) | |
tree | 66c4e9cb60b92f2b82737710789a0f99cbcfb58a /app/services/repositories | |
parent | ad765b15d8b18af8ebf26a740f679a9b3c543c1a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/repositories')
-rw-r--r-- | app/services/repositories/changelog_service.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/services/repositories/changelog_service.rb b/app/services/repositories/changelog_service.rb index 96db00fbc1b..eafd9d7a55e 100644 --- a/app/services/repositories/changelog_service.rb +++ b/app/services/repositories/changelog_service.rb @@ -60,7 +60,7 @@ module Repositories end # rubocop: enable Metrics/ParameterLists - def execute + def execute(commit_to_changelog: true) config = Gitlab::Changelog::Config.from_git(@project, @user) from = start_of_commit_range(config) @@ -93,9 +93,13 @@ module Repositories end end - Gitlab::Changelog::Committer - .new(@project, @user) - .commit(release: release, file: @file, branch: @branch, message: @message) + if commit_to_changelog + Gitlab::Changelog::Committer + .new(@project, @user) + .commit(release: release, file: @file, branch: @branch, message: @message) + else + Gitlab::Changelog::Generator.new.add(release) + end end def start_of_commit_range(config) |