3个版本
0.1.2 | 2021年2月9日 |
---|---|
0.1.1 | 2021年1月5日 |
0.1.0 | 2020年10月26日 |
#1735 in 开发工具
32KB
591 代码行
📓 Relnotes:自动GitHub版本说明
Relnotes是一个用于自动生成GitHub仓库所有合并的pull request文件的工具。它包含一个简单的配置文件和强大的模板,允许您轻松以您喜欢的格式和结构创建版本说明。
工作原理
功能
- 自动获取自上次发布以来的所有合并的PR,并可配置不同的发布计划。
- 自动列出发布时的贡献者。
- 使用正则表达式进行标签过滤和分类。
- 强大的配置文件,用于高级布局。
- 支持从多个仓库收集更改。
- 使用Tera模板进行版本说明格式。
如何使用
relnotes
的基本用法是通过提供仓库和新版本的信息来实现的。例如,如果您想生成[rust-gpu]的潜在新版本0.3.0.3的版本说明,您将运行以下命令。
relnotes EmbarkStudios/rust-gpu@0.3.0
这将生成以下Markdown格式的内容
# rust-gpu 0.3.0 (2020-12-29)
- [Update .cargo/config Shader Compilation Setup](https://github.com/EmbarkStudios/rust-gpu/pull/356)
- [Upgrade winit v0.23 -> v0.24](https://github.com/EmbarkStudios/rust-gpu/pull/353)
- [Update spirv-tools](https://github.com/EmbarkStudios/rust-gpu/pull/351)
- [Renamed spirv-attrib to spirv-std-macros](https://github.com/EmbarkStudios/rust-gpu/pull/347)
<!-- Shortened for brevity -->
## Contributors
- [DGriffin91](https://github.com/DGriffin91)
- [Hentropy](https://github.com/Hentropy)
- [Jake-Shadle](https://github.com/Jake-Shadle)
- [VZout](https://github.com/VZout)
<!-- Shortened for brevity -->
配置文件
# GitHub repository owner
owner = "EmbarkStudios"
# GitHub Repository
repo = "relnotes"
# Both `from` and `to` accept either any fixed timestamp, `today`, or
# `release:` followed by either a tag to use that tag's release date
# or `latest` to always select the latest release.
# Syntax: <date|(release:(latest|<tag>))>
#
# The start of the new release timeframe. Default: `release:latest`.
from = "release:latest"
# The end of the timeframe. Default: `today`.
to = "today"
# Format string for the `date` variable in `[template]`. Default: `%Y-%m-%d`
date-format = "%Y-%m-%d"
# Set of regular expressions that if any of the PR's labels match will
# be skipped and not included in the release notes. Default: `[]`
skip-labels = []
# A set of categories to populate the `categories` variable and to help
# organise the release notes, if any of the issues labels match the set
# of regexes in `labels` it will be placed in this category. (Priority matches
# order in toml file). Default: empty
[[categories]]
# The title of the category
title = "Updated Dependencies"
# Set of regexes to match against the labels.
labels = ["dependencies"]
# Additional repositories to include in the release notes. It has all
# of the same properties as root (except `includes`), and inherits root's
# configuration if omitted.
[[includes]]
owner = "owner"
repo = "repo"
# Gets the timeframe from the root repository rather than the `includes`
# repository.
uses-parent-for-timeframe = false
# from = "release:latest"
# to = "today"
# date-format = "%Y-%m-%d"
# skip-labels = []
# [[includes.categories]]
# The template to generate the release notes. The `[template]` map accepts
# either a `string` literal or a `path` to the tera template to use. (Does
# not accept both.)
# Variables available
# - `version`: The version passed to `relnotes`
# - `date`: The `to` date formatted by `date_format`.
# - `categories`: A map of prs categorised by their `title`. `title -> prs`
# - `prs`: Any PRs that weren't filtered or categorised.
[template]
# path = "template.md"
string = """
Version {{version}} ({{date}})
============================
{% for title, prs in categories %}
## {{ title }}
{%- for pr in prs %}
- [{{pr.title}}]({{pr.html_url}})
{%- endfor %}
{% endfor %}
## Uncategorised PRs
{% for pr in prs -%}
- [{{pr.title}}]({{pr.html_url}})
{% endfor %}
"""
贡献
我们欢迎社区对该项目的贡献。
请阅读我们的贡献指南以获取有关如何开始的更多信息。
许可
根据您选择以下任一项许可:
- Apache许可证2.0版(LICENSE-APACHE 或 https://apache.ac.cn/licenses/LICENSE-2.0)
- MIT许可证(LICENSE-MIT 或 http://opensource.org/licenses/MIT)
进行选择。
贡献
除非您明确声明,否则您根据Apache-2.0许可证定义的任何贡献,都将如上所述进行双许可,而无需任何额外的条款或条件。
依赖关系
~19–37MB
~558K SLoC