Gitlab 生成变更日志脚本

标签 git gitlab

第一次使用 Gitlab。

我在本地 PC 上有一个现有的 Web 项目,我运行了这些命令;

cd /myFolder
git init
git add .
git remote add origin remote repository URL
git commit -m "First commit"
git push origin master

这将我所有的文件添加到我的远程仓库中 - 到目前为止一切正常。

我注意到在gitlab网站上,在我的项目页面上,有一个按钮Add Changelog(以及add readmeadd licence等)。我点击了这个按钮,并在我的文件夹中创建了一个空的 changelog.md,我已经能够将其 pull 入我的本地仓库。

如何生成变更日志条目?

我已阅读 documentationthis question但我还是不明白。

我在本地仓库的任何地方都看不到 bin/changelog

我是否必须克隆整个 Gitlab在某处 repo ?

感谢任何建议。

最佳答案

不再需要脚本。

参见 GitLab 13.9(2021 年 2 月)

Create changelogs using the GitLab API

Previously, generating a changelog using GitLab was a manual process. Release Managers had to collect all the changes for a given release and then manually add them to a changelog file, which was time-consuming and prone to error. To make this process easier, we have now added an API that will automatically generate a changelog for a given release based on commit history. This enables development teams to better communicate changes to end users by delivering a consistent and comprehensive set of changelogs for every release.

See Documentation and Issue.

例子:

## 1.0.0 (2021-01-05)

### Features (4 changes)

- [Feature 1](gitlab-org/gitlab@123abc) by @alice ([merge request](gitlab-org/gitlab!123))
- [Feature 2](gitlab-org/gitlab@456abc) ([merge request](gitlab-org/gitlab!456))
- [Feature 3](gitlab-org/gitlab@234abc) by @steve
- [Feature 4](gitlab-org/gitlab@456)

关于Gitlab 生成变更日志脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51632525/

相关文章:

java - 使用 JGit 列出存储库的所有修订

git - 摆脱 "git:/usr/local/lib/libz.so.1: no version information available (required by git)"

ruby-on-rails - Gitlab ci安装报错

git - 分支未出现在新远程 'gitlab'

php - 在笔记本电脑和 PC 之间同步 eclipse 项目

git - 为什么 git difftool 返回 "cannot run git-difftool--helper"错误?

Git 重新标记理智和疯狂的建议 - 第 2 部分

continuous-integration - 使用部署 token 发布到 Gitlab 包注册表

Gitlab CI runner 没有构建或显示任何输出

mysql - 无法使用 gitlab-ci.yml 连接到 MySql