Method: Gitlab::Client::Repositories#generate_changelog

Defined in:
lib/gitlab/client/repositories.rb

#generate_changelog(project, version, options = {}) ⇒ bool

Generate changelog data

Examples:

Gitlab.generate_changelog(42, 'v1.0.0')
Gitlab.generate_changelog(42, 'v1.0.0', branch: 'main')

Parameters:

  • project (Integer, String)

    The ID or name of a project

  • version (String)

    The version to generate the changelog for

  • options (Hash) (defaults to: {})

    A customizable set of options

Options Hash (options):

  • :from (String)

    The start of the range of commits (SHA)

  • :to (String)

    The end of the range of commits (as a SHA) to use for the changelog

  • :date (String)

    The date and time of the release, defaults to the current time

  • :branch (String)

    The branch to commit the changelog changes to

  • :trailer (String)

    The Git trailer to use for including commits

  • :file (String)

    The file to commit the changes to

  • :message (String)

    The commit message to produce when committing the changes

Returns:

  • (bool)
[View source]

109
110
111
# File 'lib/gitlab/client/repositories.rb', line 109

def generate_changelog(project, version, options = {})
  post("/projects/#{url_encode project}/repository/changelog", body: options.merge(version: version))
end