Changelog CI 项目使用教程

Changelog CI 项目使用教程

changelog-ciChangelog CI is a GitHub Action that enables a project to automatically generate changelogs项目地址:https://gitcode.com/gh_mirrors/ch/changelog-ci

1. 项目的目录结构及介绍

Changelog CI 是一个用于自动生成变更日志的 GitHub Action。以下是其基本的目录结构:

changelog-ci/
├── .github/
│   └── workflows/
│       └── changelog-ci.yml
├── config/
│   ├── changelog-ci-config.json
│   └── changelog-ci-config.yaml
├── src/
│   ├── entrypoint.sh
│   └── main.py
├── CHANGELOG.md
├── README.md
└── .gitignore

目录结构介绍

  • .github/workflows/: 包含 GitHub Actions 的工作流配置文件。
  • config/: 包含项目的配置文件,如 changelog-ci-config.jsonchangelog-ci-config.yaml
  • src/: 包含项目的源代码文件,如 entrypoint.shmain.py
  • CHANGELOG.md: 项目的变更日志文件。
  • README.md: 项目的说明文档。
  • .gitignore: 指定 Git 忽略的文件和目录。

2. 项目的启动文件介绍

Changelog CI 的启动文件主要是 entrypoint.shmain.py

entrypoint.sh

entrypoint.sh 是一个 shell 脚本,用于启动和配置 Changelog CI 的运行环境。它包含了一些初始化和配置命令,确保项目能够正确运行。

main.py

main.py 是 Python 脚本,包含了 Changelog CI 的主要逻辑。它负责处理输入参数、生成变更日志并输出结果。

3. 项目的配置文件介绍

Changelog CI 支持通过 JSON 或 YAML 格式的配置文件进行自定义配置。以下是一个示例配置文件的内容:

changelog-ci-config.json

{
  "changelog_type": "pull_request",
  "header_prefix": "Version:",
  "commit_changelog": true,
  "comment_changelog": true
}

changelog-ci-config.yaml

changelog_type: pull_request
header_prefix: Version:
commit_changelog: true
comment_changelog: true

配置文件选项

  • changelog_type: 指定生成变更日志的方式,可选值为 pull_requestcommit_message
  • header_prefix: 变更日志版本号的前缀,例如 Version:
  • commit_changelog: 是否将变更日志提交到仓库,可选值为 truefalse
  • comment_changelog: 是否在拉取请求中评论变更日志,可选值为 truefalse

通过这些配置文件,用户可以灵活地调整 Changelog CI 的行为,以满足不同的需求。

changelog-ciChangelog CI is a GitHub Action that enables a project to automatically generate changelogs项目地址:https://gitcode.com/gh_mirrors/ch/changelog-ci

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

葛梓熙

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值