最近在发布 kuasar-io/kuasar v1.0.1 补丁版本。在 main 分支同步 release/1.0 时,commit没有按照原有 PR 提交新 PR 进行同步,而是使用了手动 Cherry-pick 的方式同步了commit。导致发布 Release 时,Generate release notes 自动生成的PR记录无法at原作者。
因此考虑导出 v1.0.0 ~ HEAD 之间的 commit 记录,并单独 at作者。使用如下脚本导出commit,并 at原作者,然后再进行人工审核和补全。
#!/bin/bash
cd /path/to/your/project/
git fetch --all
for commit in $(git log v1.0.0..gh/release/1.0 --pretty=format:"%H"); do
message=$(git log -1 --pretty=format:"%s" $commit)
author_email=$(git log -1 --pretty=format:"%ae" $commit)
# 通过 GitHub API 获取用户名(需要 GitHub 令牌)
github_user=$(curl -s -H "Authorization: token YOUR_GITHUB_TOKEN" \
"https://api.github.com/search/users?q=$author_email" | jq -r '.items[0].login')
if [ "$github_user" != "null" ] && [ -n "$github_user" ]; then
echo "* $message (@$github_user)"
else
author_name=$(git log -1 --pretty=format:"%an" $commit)
echo "* $message ($author_name)"
fi
done
脚本执行结果如下,手动处理就是将 Merge记录 和 机器人创建的bump记录 删掉,然后将几个git邮箱和github邮箱不匹配的贡献者手动找出用户名 at一下。
* Merge pull request #199 from morningtzh/release/1.0 (@abel-von)
* chore(kernel): adapt kernel compilation to latest cloud-hypervisor (@morningtzh)
* chore(deps): update release workflow to use actions/upload-artifact@v4 (@morningtzh)
* Merge pull request #196 from morningtzh/for1.0.1 (@Burning1020)
* Update build.sh to fix build errors (Max)
* build(deps): bump h2 from 0.3.21 to 0.3.26 in /wasm (dependabot[bot])
* build(deps): bump h2 from 0.3.21 to 0.3.26 in /shim (dependabot[bot])
* build(deps): bump h2 from 0.3.21 to 0.3.26 in /runc (dependabot[bot])
* build(deps): bump h2 from 0.3.21 to 0.3.26 in /quark (dependabot[bot])
* build(deps): bump rustix from 0.36.15 to 0.36.17 in /runc (dependabot[bot])
* build(deps): bump mio from 0.8.6 to 0.8.11 in /wasm (dependabot[bot])
* build(deps): bump h2 from 0.3.20 to 0.3.26 in /vmm/sandbox (dependabot[bot])
* build(deps): bump rustix from 0.37.19 to 0.37.28 in /vmm/task (dependabot[bot])
* build(deps): bump rustix from 0.38.10 to 0.38.34 in /shim (dependabot[bot])
* build(deps): bump rustix from 0.36.14 to 0.36.17 in /wasm (dependabot[bot])
* task: add debug_shell param (kamizjw)
* fix docs as default config.toml path changed (@abel-von)
* vmm: fix recover failed when first start (@abel-von)
* clear pod cpuset (@morningtzh)
* Shorten tap name (@morningtzh)
* Merge pull request #185 from morningtzh/for1.0.1 (@abel-von)
* fix clippy warning (@morningtzh)
* ci: update rust (@morningtzh)
* vmm:qemu support config_qemu.toml (liuxu)
* vmm: support youki when create container in vm (@abel-von)
* bugfix: faild to symlink console socket into container_dir. (taohong)
* vmm-task: use crate youki to manage container instead of runc (Vanient)
* vmm: support trace for sandbox and task api (@Ziy1-Tan)
* vmm:qemu support aarch64 (liuxu)
* add prefix 'kuasar-' for container runtime (@Ziy1-Tan)
* ci: add MSRV (@Burning1020)
* doc: Update llamaedge app docs (@Burning1020)
发布结果参考:Release v1.0.1 · kuasar-io/kuasar · GitHub
最终的 Contributors 中就包含所有贡献者了。