logo
51
166
WeChat Login

cnbcool/changelog 插件生成 changelog 为空#910

Resolved
created 2025-06-03
Edit

使用 cnbcool/changelog 和内置任务 git:release 自动创建 release 时,最新和次新 tag 之间有一些 ci 和 fix 的 PR/提交记录,但是生成的 changelog 为空。在其他仓库也有使用类似的流水线,是能生成一些 changelog 信息的,但是这个仓库生成的 changelog 却为空,不知道有哪些可能的原因。

以下是 cnb.yml 配置

.release-pipeline: &release-pipeline
  - name: release-pipeline
    stages:
      - name: Make changelog
        image: cnbcool/changelog
        exports:
            latestChangeLog: LATEST_CHANGE_LOG
      - name: Create release
        type: git:release
        options:
          description: ${LATEST_CHANGE_LOG}

"(main|test)":
  web_trigger_build_docker_image:
    - <<: *build-pipeline
  pull_request:
    - <<: *notify-review-pipeline
  pull_request.approved:
    - <<: *notify-approved-pipeline
  pull_request.mergeable:
    - <<: *notify-mergeable-pipeline
$:
  tag_push:
    - <<: *build-pipeline
    - <<: *release-pipeline

以下是 tag 对比,显示两个 tag 之间的有意义的提交记录:

f96c922b-203d-41e5-bc07-3b8df2d73142.png

以下是流水线日志,显示 changelog 为空:

f65ba2ab-dd98-4690-a98d-184a59e1d6c8.png

以下是实际的 release 页面,显示概览也为空:

0863cb5d-aa78-4567-98b9-c3bd63941269.png
Administrator

默认需要
feat:
fix:
这种开头的commit msg

Creator

默认需要
feat:
fix:
这种开头的commit msg

截图可以看出,以下 3 个 commit msg 是符合规范和插件要求的

ci: 更新流水线配置
fix: 修复模型传参数问题
ci: 移除无用环境变量

f96c922b-203d-41e5-bc07-3b8df2d73142.png
Administrator

麻烦贴下流水线日志链接

Creator

https://cnb.cool/xxx/-/build/logs/cnb-q9h-1isq6mke6

阅读后请反馈,我删除私有仓库信息

Administrator

已阅,我们看看

Creator

下次关于仓库信息的评论麻烦不要「引用」,不然我没有权限更改和删除敏感信息,还要再麻烦你删除😁

Administrator

get,去掉了引用

Administrator

@heng.zhang 从代码看不出来啥问题
方不方便加下我微信,邀请我进仓库看看

Creator

@heng.zhang 从代码看不出来啥问题
方不方便加下我微信,folger_fan 邀请我进仓库看看

已添加

Administrator

pr合并用merge的方式,合并后的commit的title不符合 feat: fix: 这种规则

Resolved ISSUE
Creator

和 pr 合并后的 title 无关,应该是插件没有获取到来自源分之的原始提交,只获取到了在目标分之上新产生的提交节点

Reopen
added labels
一定是bug,除非不是
Administrator

调整使用方式解决

Resolved ISSUE
Assignee
None yet
Label
一定是bug:除非不是
Priority
None yet
Time period
-
Property
Add custom properties to record and label key information
Participant