1 Star 2 Fork 1

via/poco

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gh-cli-for-release-notes.sh 2.91 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
#
# Helper script to prepare changelog for a release.
#
# It filters GitHub issues and pull requests for the specified milestone and
# prints a list on standard output. The generated list needs to be reviewed by
# a maintainer before including it to the CHANGELOG.
#
# It uses GitHub CLI from https://github.com/cli/cli
#
# Usage: gh-cli-release-notes.sh <GitHub milestone name>
#
if [[ $# -eq 0 ]] ; then
echo 'Usage: gh-cli-release-notes.sh <GitHub milestone name>'
exit 1
fi
MILESTONE=$1
echo
echo "${MILESTONE} ($(date "+%Y-%m-%d"))"
echo ===========================
echo
echo "Summary of Changes:"
echo
echo "Breaking Changes:"
echo
gh issue list -S 'milestone:"'"${MILESTONE}"'" label:breaking' -s all -L 500 --json number,title --jq '.[] | "- GH #\(.number) \(.title)"'
gh pr list -S 'milestone:"'"${MILESTONE}"'" label:breaking' -s all -L 500 --json number,title --jq '.[] | "- PR #\(.number) \(.title)"'
echo
echo "Security Fixes:"
echo
gh issue list -S 'milestone:"'"${MILESTONE}"'" -label:breaking label:security' -s all -L 500 --json number,title --jq '.[] | "- GH #\(.number) \(.title)"'
gh pr list -S 'milestone:"'"${MILESTONE}"'" -label:breaking label:security' -s all -L 500 --json number,title --jq '.[] | "- PR #\(.number) \(.title)"'
echo
echo "Features, Enhancements and Third Party Updates:"
echo
gh issue list -S 'milestone:"'"${MILESTONE}"'" -label:breaking -label:security label:enhancement' -s all -L 500 --json number,title --jq '.[] | "- GH #\(.number) \(.title)"'
gh issue list -S 'milestone:"'"${MILESTONE}"'" -label:breaking -label:security -label:enhancement label:feature' -s all -L 500 --json number,title --jq '.[] | "- GH #\(.number) \(.title)"'
gh issue list -S 'milestone:"'"${MILESTONE}"'" -label:breaking -label:security -label:enhancement -label:feature label:third-party' -s all -L 500 --json number,title --jq '.[] | "- GH #\(.number) \(.title)"'
gh pr list -S 'milestone:"'"${MILESTONE}"'" -label:breaking -label:security label:enhancement' -s all -L 500 --json number,title --jq '.[] | "- PR #\(.number) \(.title)"'
gh pr list -S 'milestone:"'"${MILESTONE}"'" -label:breaking -label:security -label:enhancement label:feature' -s all -L 500 --json number,title --jq '.[] | "- PR #\(.number) \(.title)"'
gh pr list -S 'milestone:"'"${MILESTONE}"'" -label:breaking -label:security -label:enhancement -label:feature label:third-party' -s all -L 500 --json number,title --jq '.[] | "- PR #\(.number) \(.title)"'
echo
echo "Bug Fixes and Improvements:"
echo
gh issue list -S 'milestone:"'"${MILESTONE}"'" -label:breaking -label:enhancement -label:feature -label:security -label:third-party' -s all -L 500 --json number,title --jq '.[] | "- GH #\(.number) \(.title)"'
gh pr list -S 'milestone:"'"${MILESTONE}"'" -label:breaking -label:enhancement -label:feature -label:security -label:third-party' -s all -L 500 --json number,title --jq '.[] | "- PR #\(.number) \(.title)"'
echo
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/chooosky/poco.git
git@gitee.com:chooosky/poco.git
chooosky
poco
poco
main

搜索帮助