No commit activity in last 3 years
No release in over 3 years
Get changelog using GitLab API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

gitlab_changelog plugin

fastlane Plugin Badge

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-gitlab_changelog, add it to your project by running:

fastlane add_plugin gitlab_changelog

About gitlab_changelog

Get commit changelog using GitLab API

Plugin is particularly useful if you use Shallow Cloning and have small number, like GIT_DEPTH: "1", setting in your GitLab CI config.

In such case, Fastlane's native changelog_from_git_commits action is not helpful, because CI machine does not have a full git history to construct a changelog.

This plugin resolves latest release branch using git ls-remote (always available).

git ls-remote --sort='v:refname' --heads origin refs/heads/release/*

refs/heads/release/4.267.0
refs/heads/release/4.269.0
refs/heads/release/4.269.1
refs/heads/release/4.270.0
refs/heads/release/4.270.1

And then, fetches a changelog (JSON) between the current branch and the latest release branch using GitLab API.

In a case then CI is on release branch currently - a changelog between current and previous release branches is constructed.

Usage:

change_log = gitlab_changelog(
    current_branch: "develop",
    compare_branch_prefix: "release",
    gitlab_API_baseURL: "http://git.yourcompany.net/api/v4",
    gitlab_project_id: "123",
    gitlab_API_token: "secret_gitlab_token"
  )

Params:

  • current_branch : Actions.git_branch or ENV['CI_COMMIT_REF_NAME'] (default)
  • compare_branch_prefix : default is release to compare against release/*.*.* branches
  • gitlab_API_baseURL : a root URL for your GitLab API
  • gitlab_project_id : ENV['CI_PROJECT_ID'] (default)
  • gitlab_API_token : Create a GitLab API Token and define it as a variable on your CI environment like ENV['MY_GITLAB_API_TOKEN']

Output: Fetching changeLog from: release/4.270.1 to: develop (GET http://git.yourcompany.net/api/v4/projects/123/repository/compare)

DEV0001 Feature 2 (Thom Yorke) 2019-12-31
DEV0002 Feature 1 (Jonny Greenwood) 2019-12-30

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting guide.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.