Skip to content

Commit 7e1a5c7

Browse files
authored
Update release draft model and preserve breaking changes (#3057)
1 parent 5bd8eab commit 7e1a5c7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/release-draft.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
- Return empty string for breaking_changes_content if no breaking changes
7979
8080
claude_args: |
81-
--model claude-opus-4-5-20251101
81+
--model claude-opus-4-6
8282
--max-turns 50
8383
--json-schema '{"type":"object","properties":{"has_breaking_changes":{"type":"boolean","description":"Whether this PR contains breaking changes"},"breaking_changes_content":{"type":"string","description":"Formatted breaking changes section content (without ## Breaking Changes header), or empty string if none"},"reasoning":{"type":"string","description":"Brief explanation of why this is or is not a breaking change"}},"required":["has_breaking_changes","breaking_changes_content","reasoning"]}'
8484
@@ -183,6 +183,7 @@ jobs:
183183
DRAFT_TAG_RAW=$(gh release list --json tagName,isDraft --jq '[.[] | select(.isDraft == true)] | .[0].tagName // ""')
184184
DRAFT_TAG="${DRAFT_TAG_RAW#v}"
185185
DRAFT_TAG="${DRAFT_TAG#V}"
186+
BC_SOURCE_TAG_RAW="$DRAFT_TAG_RAW"
186187
187188
# Determine next version
188189
if [ -n "$DRAFT_TAG" ]; then
@@ -204,6 +205,7 @@ jobs:
204205
fi
205206
else
206207
OLD_DRAFT_TAG=""
208+
BC_SOURCE_TAG_RAW=""
207209
# No draft exists, calculate new version
208210
if [ "$HAS_BC" = "true" ]; then
209211
NEW_MINOR=$((MINOR + 1))
@@ -238,8 +240,8 @@ jobs:
238240
239241
# Get existing draft body if updating (only if DRAFT_TAG_RAW is set, meaning we're updating same version)
240242
EXISTING_BC=""
241-
if [ -n "$DRAFT_TAG_RAW" ]; then
242-
EXISTING_BODY=$(gh release view "$DRAFT_TAG_RAW" --json body --jq '.body // ""')
243+
if [ -n "$BC_SOURCE_TAG_RAW" ]; then
244+
EXISTING_BODY=$(gh release view "$BC_SOURCE_TAG_RAW" --json body --jq '.body // ""')
243245
# Extract existing Breaking Changes section content
244246
# Use awk for precise extraction - stops at any ## header that's not "## Breaking Changes"
245247
if echo "$EXISTING_BODY" | grep -q '^## Breaking Changes$'; then

0 commit comments

Comments
 (0)