File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,20 @@ jobs:
104104
105105 # Save the generated release notes to a file
106106 release_notes = response.choices[0].message.content
107+
108+ # Remove markdown code block markers if present
109+ if release_notes.startswith("```markdown"):
110+ release_notes = release_notes.replace("```markdown", "", 1)
111+ if release_notes.endswith("```"):
112+ release_notes = release_notes[:-3]
113+ elif release_notes.startswith("```"):
114+ release_notes = release_notes.replace("```", "", 1)
115+ if release_notes.endswith("```"):
116+ release_notes = release_notes[:-3]
117+
118+ # Strip any leading/trailing whitespace
119+ release_notes = release_notes.strip()
120+
107121 with open("release_notes.md", "w") as f:
108122 f.write(release_notes)
109123
You can’t perform that action at this time.
0 commit comments