Skip to content

Commit ba6ffbc

Browse files
committed
Refine release notes extraction to include content between gitstream placeholders and update output format
1 parent d21f85e commit ba6ffbc

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/create-tag-on-merge.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ jobs:
4141
const pull_number = prs[0].number;
4242
const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number });
4343
44-
// Extract only the Purpose section from PR description
44+
// Extract content between gitstream placeholders, excluding header and footer
4545
let releaseNote = pr.title;
4646
4747
if (pr.body) {
48-
const purposeMatch = pr.body.match(/Purpose:\s*([^\n]+)/);
48+
const contentMatch = pr.body.match(/<!--start_gitstream_placeholder-->.*?### ✨ PR Description\s*(.*?)\s*_Generated by LinearB AI.*?<!--end_gitstream_placeholder-->/s);
4949
50-
if (purposeMatch) {
51-
releaseNote = purposeMatch[1].trim();
50+
if (contentMatch) {
51+
releaseNote = contentMatch[1].trim();
5252
}
5353
}
5454
@@ -71,11 +71,10 @@ jobs:
7171
7272
# Create release notes with PR title, description, and link
7373
cat > release_notes.md << EOF
74-
## ${PR_TITLE}
74+
## What's Changed
7575
76+
- ${PR_TITLE} in [#${PR_NUMBER}](https://github.com/${{ github.repository }}/pull/${PR_NUMBER})
7677
${RELEASE_NOTES}
77-
78-
**Pull Request:** [#${PR_NUMBER}](https://github.com/${{ github.repository }}/pull/${PR_NUMBER})
7978
EOF
8079
8180
cat release_notes.md

0 commit comments

Comments
 (0)