@@ -72,44 +72,61 @@ jobs:
7272 # Fetch milestone ID for the link
7373 MILESTONE_ID=$(gh api repos/${{ github.repository }}/milestones -q ".[] | select(.title==\"$VERSION_NUM\") | .number")
7474
75- # 1. Fetch NEW features (requires the 'feature ' label)
75+ # 1. Fetch BREAKING changes (requires the 'break-change ' label)
7676 gh issue list \
7777 --repo ${{ github.repository }} \
78- --search "milestone:\"$VERSION_NUM\" label:feature" \
78+ --search "milestone:\"$VERSION_NUM\" label:break-change" \
79+ --state all \
80+ --limit 100 \
81+ --json title,url \
82+ --jq '.[] | "- [\(.title)](\(.url))"' > breaking_issues.md
83+
84+ # 2. Fetch NEW features (requires the 'feature' label)
85+ gh issue list \
86+ --repo ${{ github.repository }} \
87+ --search "milestone:\"$VERSION_NUM\" label:feature -label:break-change" \
7988 --state all \
8089 --limit 100 \
8190 --json title,url \
8291 --jq '.[] | "- [\(.title)](\(.url))"' > new_issues.md
8392
84- # 2 . Fetch OTHER changes (excludes 'feature' and 'dependencies')
93+ # 3 . Fetch OTHER changes (excludes 'feature', 'break-change', and 'dependencies')
8594 gh issue list \
8695 --repo ${{ github.repository }} \
87- --search "milestone:\"$VERSION_NUM\" -label:feature -label:dependencies" \
96+ --search "milestone:\"$VERSION_NUM\" -label:feature -label:break-change -label: dependencies" \
8897 --state all \
8998 --limit 100 \
9099 --json title,url \
91100 --jq '.[] | "- [\(.title)](\(.url))"' > other_issues.md
92101
93- # 3 . Initialize the changelog file
102+ # 4 . Initialize the changelog file
94103 > changelog.md
95104
96- # 4. Conditionally add "What's New" if new_issues.md has content (-s)
105+ # 5. Conditionally add "Breaking Changes" if breaking_issues.md has content (-s)
106+ if [ -s breaking_issues.md ]; then
107+ echo "## ⚠️ Breaking Changes" >> changelog.md
108+ echo "" >> changelog.md
109+ cat breaking_issues.md >> changelog.md
110+ echo "" >> changelog.md
111+ fi
112+
113+ # 6. Conditionally add "What's New" if new_issues.md has content
97114 if [ -s new_issues.md ]; then
98115 echo "## 🚀 What's New" >> changelog.md
99116 echo "" >> changelog.md
100117 cat new_issues.md >> changelog.md
101118 echo "" >> changelog.md
102119 fi
103120
104- # 5 . Conditionally add "Other Changes" if other_issues.md has content
121+ # 7 . Conditionally add "Other Changes" if other_issues.md has content
105122 if [ -s other_issues.md ]; then
106123 echo "## 🛠️ Changes" >> changelog.md
107124 echo "" >> changelog.md
108125 cat other_issues.md >> changelog.md
109126 echo "" >> changelog.md
110127 fi
111128
112- # 6 . Build the rest of the changelog (Links & Sponsors)
129+ # 8 . Build the rest of the changelog (Links & Sponsors)
113130 cat << EOF >> changelog.md
114131 ### 🔗 Links & Resources
115132 - [$CURRENT_TAG](https://github.com/jooby-project/jooby/tree/$CURRENT_TAG)
0 commit comments