From c460dcbf6d861805a6d3ad2d2ba62d33cbc89e13 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 09:35:46 +0000 Subject: [PATCH 1/5] Initial plan From 4714986aa50749c9dd0eecdc659b42872410a9a2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 09:46:27 +0000 Subject: [PATCH 2/5] feat: add automated Release Announcement maintained by GitHub Copilot Adds a working ReleaseAnnouncement.md (separate from the ChangeLog) that is automatically updated by GitHub Copilot via actions/ai-inference whenever a PR is merged to main. The announcement is curated for Client users and Server operators only. Co-authored-by: pljones <1549463+pljones@users.noreply.github.com> --- .github/workflows/autobuild.yml | 2 + .../workflows/update-release-announcement.yml | 140 ++++++++++++++++++ ReleaseAnnouncement.md | 29 ++++ 3 files changed, 171 insertions(+) create mode 100644 .github/workflows/update-release-announcement.yml create mode 100644 ReleaseAnnouncement.md diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 805ff819c1..b2fb59bc6a 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -39,6 +39,7 @@ on: - 'COMPILING.md' - 'COPYING' - 'APPLEAPPSTORE.LICENCE.WAIVER' + - 'ReleaseAnnouncement.md' - '.github/ISSUE_TEMPLATE/*' - '.github/pull_request_template.md' pull_request: @@ -52,6 +53,7 @@ on: - 'COMPILING.md' - 'COPYING' - 'APPLEAPPSTORE.LICENCE.WAIVER' + - 'ReleaseAnnouncement.md' - '.github/ISSUE_TEMPLATE/*' - '.github/pull_request_template.md' diff --git a/.github/workflows/update-release-announcement.yml b/.github/workflows/update-release-announcement.yml new file mode 100644 index 0000000000..6e899c89af --- /dev/null +++ b/.github/workflows/update-release-announcement.yml @@ -0,0 +1,140 @@ +name: Update Release Announcement + +# This workflow updates the working Release Announcement (ReleaseAnnouncement.md) +# using GitHub Copilot whenever a pull request is merged to main. +# The announcement targets Client users (musicians) and Server operators, and is +# intentionally separate from the ChangeLog. +# +# We use pull_request_target so the workflow has write access to the base repository +# even when the source branch comes from a fork. +# WARNING: pull_request_target runs in a privileged context. +# - The workflow file and scripts always come from the base branch (main), not the PR. +# - Only PR *metadata* (title, body, author) is passed to the AI; no code from the PR +# is checked out or executed. +# See: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ + +on: + pull_request_target: + types: + - closed + branches: + - main + +permissions: {} + +jobs: + update-release-announcement: + name: Update Release Announcement + # Only run for actual merges (not just closed PRs) on the main jamulussoftware repo. + if: >- + github.repository_owner == 'jamulussoftware' && + github.event.pull_request.merged == true + runs-on: ubuntu-latest + permissions: + contents: write + models: read + + steps: + - uses: actions/checkout@v6 + with: + # Always check out the base branch (main), never the PR branch. + ref: main + + - name: Check if announcement update should be skipped + id: check-skip + env: + PR_BODY: ${{ github.event.pull_request.body }} + run: | + # Skip when the PR author explicitly marked the change as not user-facing. + if printf '%s\n' "$PR_BODY" | grep -qE '^CHANGELOG:[[:space:]]*SKIP[[:space:]]*$'; then + echo "Skipping: PR is marked CHANGELOG: SKIP" + echo "skip=true" >> "$GITHUB_OUTPUT" + else + echo "skip=false" >> "$GITHUB_OUTPUT" + fi + + - name: Read current Release Announcement + id: read-announcement + if: steps.check-skip.outputs.skip == 'false' + run: | + # Use a random delimiter to safely capture multi-line file content. + delimiter="EOF_${RANDOM}_${RANDOM}" + { + printf 'content<<%s\n' "$delimiter" + cat ReleaseAnnouncement.md + printf '%s\n' "$delimiter" + } >> "$GITHUB_OUTPUT" + + - name: Update Release Announcement with GitHub Copilot + id: update-announcement + if: steps.check-skip.outputs.skip == 'false' + uses: actions/ai-inference@v1 + with: + model: openai/gpt-4o-mini + system-prompt: | + You are a technical writer maintaining the Release Announcement for Jamulus — + a free, open-source application that lets musicians rehearse, perform, and jam + together in real time over the internet. + + The Release Announcement is a curated, user-friendly document for two audiences: + + 1. **Client users** — musicians who use the Jamulus client application to play + with others online. They care about improved sound quality, new UI features, + connection improvements, new instruments or chat features, and bug fixes that + affect their playing experience. + + 2. **Server operators** — people who run Jamulus servers to host sessions. + They care about stability improvements, new configuration options, resource + usage changes, new administration tools (such as JSON-RPC additions), and + security fixes. + + Rules: + - Write in clear, friendly, non-technical language for these two audiences. + - Add content under the correct heading: "For Client Users", + "For Server Operators", or "For Platform-Specific Changes". + - Use bullet points (- ) for individual changes within each section. + - Only include changes that are relevant and meaningful to these audiences. + - Omit internal/developer-only changes such as build system updates, CI changes, + code style fixes, tooling improvements, and dependency bumps unless they have + a direct, noticeable impact on users. + - Preserve and improve existing content — do not remove or overwrite it. + - If the PR introduces no changes relevant to these audiences, return the current + announcement completely unchanged. + - Output the COMPLETE updated Markdown document and nothing else. + prompt: | + Current Release Announcement: + --- + ${{ steps.read-announcement.outputs.content }} + --- + + Newly merged pull request #${{ github.event.pull_request.number }}: + Title: ${{ github.event.pull_request.title }} + Author: @${{ github.event.pull_request.user.login }} + + PR description: + ${{ github.event.pull_request.body }} + --- + + Update the Release Announcement to include any changes from this PR that are + relevant to Client users or Server operators. Return the complete updated + Markdown document only. + + - name: Write updated Release Announcement + if: steps.check-skip.outputs.skip == 'false' + env: + UPDATED_CONTENT: ${{ steps.update-announcement.outputs.response }} + run: | + printf '%s\n' "$UPDATED_CONTENT" > ReleaseAnnouncement.md + + - name: Commit and push updated announcement + if: steps.check-skip.outputs.skip == 'false' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.email "actions@github.com" + git config --global user.name "github-actions[bot]" + git add ReleaseAnnouncement.md + # Exit cleanly if the AI returned the document unchanged (nothing to commit). + git diff --staged --quiet && exit 0 + git commit -m "docs: update Release Announcement for PR #${{ github.event.pull_request.number }}" + git push diff --git a/ReleaseAnnouncement.md b/ReleaseAnnouncement.md new file mode 100644 index 0000000000..e0d299b63f --- /dev/null +++ b/ReleaseAnnouncement.md @@ -0,0 +1,29 @@ +# Jamulus Next Release — Working Announcement + +> **Note for maintainers:** This is a working draft that is automatically updated by +> GitHub Copilot whenever a pull request is merged to `main`. It is intentionally +> separate from the [ChangeLog](ChangeLog), which is a complete technical record of +> every merged PR. This document is curated for **Client users** (musicians) and +> **Server operators**, covering only the changes that are relevant to them. +> Please review and polish this document before publishing the official release announcement. + +## For Client Users + + + +## For Server Operators + + + +## Platform-Specific Changes + + + +--- + +*This announcement is automatically maintained by the +[Update Release Announcement](.github/workflows/update-release-announcement.yml) workflow. +See the [ChangeLog](ChangeLog) for the full list of all merged changes.* From 1e399ff59df62a9d09678aa44b72afe897305ec7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 10:07:41 +0000 Subject: [PATCH 3/5] feat: align Release Announcement with real Jamulus style and add release lifecycle - Rewrite ReleaseAnnouncement.md to match the flat bullet-point, contributor-credited style of real Jamulus Discussion announcements (beta5 example); add Windows REMINDER and reference to tools/get_release_contributors.py - Add .github/release-announcement-template.md as the pristine template for resets - Add .github/prompts/release-announcement.prompt.yml with real Jamulus examples and rules; maintainable without touching workflow YAML - Rewrite update-release-announcement.yml: use prompt-file + file_input (safe for any PR body content), response-file output, push:tags trigger, reset-after-release job that resets the draft after every full (non-prerelease) release tag - Update autobuild.yml paths-ignore for all new documentation files Co-authored-by: pljones <1549463+pljones@users.noreply.github.com> --- .../prompts/release-announcement.prompt.yml | 62 +++++++ .github/release-announcement-template.md | 25 +++ .github/workflows/autobuild.yml | 4 + .../workflows/update-release-announcement.yml | 158 ++++++++++-------- ReleaseAnnouncement.md | 36 ++-- 5 files changed, 192 insertions(+), 93 deletions(-) create mode 100644 .github/prompts/release-announcement.prompt.yml create mode 100644 .github/release-announcement-template.md diff --git a/.github/prompts/release-announcement.prompt.yml b/.github/prompts/release-announcement.prompt.yml new file mode 100644 index 0000000000..3bcf12caf3 --- /dev/null +++ b/.github/prompts/release-announcement.prompt.yml @@ -0,0 +1,62 @@ +# AI prompt for maintaining ReleaseAnnouncement.md. +# Used by .github/workflows/update-release-announcement.yml via actions/ai-inference. +# Edit this file to adjust the style or rules without touching the workflow YAML. + +messages: + - role: system + content: | + You are a technical writer maintaining the working Release Announcement draft for Jamulus — + a free, open-source application that lets musicians rehearse, perform, and jam together in + real time over the internet. + + The announcement is a single flat list of bullet points covering user-relevant changes, + written in the same friendly, conversational style used in real Jamulus beta and release + announcements. Here are real examples of entries from those announcements: + + - the big one: extended SRV record support ([@rdica](https://github.com/rdica) and [@softins](https://github.com/softins)) + - Windows and macOS moving to Qt 6.10.2 + - a new Japanese translation ([@tsukurun](https://github.com/tsukurun)) + - fixed a crash in the Connect dialog ([@ann0see](https://github.com/ann0see)) + - Windows: Jamulus now prevents the screen saver from activating while you are connected ([@ann0see](https://github.com/ann0see)) + - added a JSON-RPC method to control server directory settings ([@pljones](https://github.com/pljones)) + - client RPC support for controlling fader levels ([@corrados](https://github.com/corrados)) + + Rules: + - Add each new change as a bullet point (- ) in the "Here's what's new" section of the + document. Do not add, remove, or modify any headings, the maintainer note block, or the + REMINDER section. + - Write in plain, friendly language. Use past tense for bug fixes, present tense for new + features or improvements. + - Use the CHANGELOG: line in the PR description (if present) as the primary source for + the description. Strip the category prefix (Client:, Server:, Build:, Tools:, etc.) + unless keeping it adds helpful context for a non-technical reader — e.g. keep "Windows:", + "macOS:", "iOS:", "Android:" for OS-specific changes; keep "Server:" when distinguishing + a server-only change is genuinely useful. + - Always credit contributors: ([@username](https://github.com/username)) + For multiple contributors: ([@a](https://github.com/a) and [@b](https://github.com/b)) + - Only include changes that are relevant to end users or server operators. + Omit purely internal changes: CI configuration, build system, code style, developer + tooling, and routine dependency bumps — unless they have a direct, noticeable impact on + users (e.g. a bundled library upgrade that fixes a crash or enables a new feature). + - Place more impactful changes nearer the top of the bullet list. + - Preserve all existing bullet points — never remove, merge, or rewrite them. + - If this PR introduces no user-relevant changes, return the announcement completely + unchanged. + - Output the COMPLETE updated Markdown document and nothing else. Do not add any + explanation, preamble, or commentary outside the document. + + - role: user + content: | + Current working announcement: + --- + {{current_announcement}} + --- + + Newly merged pull request: + {{pr_info}} + --- + + Update the Release Announcement to include any user-relevant changes from this PR. + Return the complete updated Markdown document only. + +model: openai/gpt-4o-mini diff --git a/.github/release-announcement-template.md b/.github/release-announcement-template.md new file mode 100644 index 0000000000..0a8713d662 --- /dev/null +++ b/.github/release-announcement-template.md @@ -0,0 +1,25 @@ +# Jamulus Next Release — Working Announcement Draft + +> **Note for maintainers:** This is a working draft, automatically updated by GitHub Copilot +> as PRs are merged to `main`. Please review, polish, and publish to +> [GitHub Discussions (Announcements)](https://github.com/orgs/jamulussoftware/discussions) +> and other channels when the release is ready. +> +> Run [`tools/get_release_contributors.py`](tools/get_release_contributors.py) to compile +> the full contributor list before publishing. +> +> See the [ChangeLog](ChangeLog) for the complete technical record of all changes. + +Here's what's new in the next release of Jamulus: + + + +As always, all feedback on the new version is welcome. Please raise any problems in a new bug report or discussion topic. + +--- + +**REMINDER:** Those of you with virus checkers are likely to find the Windows installer incorrectly flagged as a virus. This is because the installer is open source and virus checkers cannot be bothered to check what it installs, so assume that it's going to be malign. If you download the installer _only from the official release_, you should be safe to ignore any warning. + +--- + +*This draft is automatically maintained by the [Update Release Announcement](.github/workflows/update-release-announcement.yml) workflow.* diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index b2fb59bc6a..261c3512f3 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -40,6 +40,8 @@ on: - 'COPYING' - 'APPLEAPPSTORE.LICENCE.WAIVER' - 'ReleaseAnnouncement.md' + - '.github/release-announcement-template.md' + - '.github/prompts/**' - '.github/ISSUE_TEMPLATE/*' - '.github/pull_request_template.md' pull_request: @@ -54,6 +56,8 @@ on: - 'COPYING' - 'APPLEAPPSTORE.LICENCE.WAIVER' - 'ReleaseAnnouncement.md' + - '.github/release-announcement-template.md' + - '.github/prompts/**' - '.github/ISSUE_TEMPLATE/*' - '.github/pull_request_template.md' diff --git a/.github/workflows/update-release-announcement.yml b/.github/workflows/update-release-announcement.yml index 6e899c89af..f82cc15678 100644 --- a/.github/workflows/update-release-announcement.yml +++ b/.github/workflows/update-release-announcement.yml @@ -1,16 +1,21 @@ name: Update Release Announcement -# This workflow updates the working Release Announcement (ReleaseAnnouncement.md) -# using GitHub Copilot whenever a pull request is merged to main. -# The announcement targets Client users (musicians) and Server operators, and is -# intentionally separate from the ChangeLog. +# This workflow maintains ReleaseAnnouncement.md — a working draft of the release +# announcement for Client users and Server operators — separate from the technical ChangeLog. # -# We use pull_request_target so the workflow has write access to the base repository -# even when the source branch comes from a fork. -# WARNING: pull_request_target runs in a privileged context. -# - The workflow file and scripts always come from the base branch (main), not the PR. -# - Only PR *metadata* (title, body, author) is passed to the AI; no code from the PR -# is checked out or executed. +# On every merged PR to main: GitHub Copilot updates the draft with any user-relevant +# changes from that PR, in the same conversational bullet-point style used in real +# Jamulus beta/release announcements on GitHub Discussions. +# +# On every full release tag (r__, no suffix): the draft is reset to the pristine +# template, ready for the next development cycle. Pre-release tags (beta, rc) do NOT reset +# the draft, so it can continue to build up until the final release. +# +# Security note (pull_request_target): +# - The workflow file and the AI prompt always come from main, never from the PR branch. +# - PR content is written to a temp file via an env variable before being passed to the +# AI — it never touches a YAML value directly, preventing injection issues. +# - No code from the PR is ever checked out or executed. # See: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ on: @@ -19,13 +24,16 @@ on: - closed branches: - main + push: + tags: + - "r*" permissions: {} jobs: - update-release-announcement: - name: Update Release Announcement - # Only run for actual merges (not just closed PRs) on the main jamulussoftware repo. + update-announcement: + name: Update announcement for merged PR + # Only run on actual merges (not just closed PRs) in the main jamulussoftware repo. if: >- github.repository_owner == 'jamulussoftware' && github.event.pull_request.merged == true @@ -53,78 +61,35 @@ jobs: echo "skip=false" >> "$GITHUB_OUTPUT" fi - - name: Read current Release Announcement - id: read-announcement + - name: Prepare PR metadata for AI prompt + id: prep-pr-info if: steps.check-skip.outputs.skip == 'false' + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_TITLE: ${{ github.event.pull_request.title }} + PR_AUTHOR: ${{ github.event.pull_request.user.login }} + PR_BODY: ${{ github.event.pull_request.body }} run: | - # Use a random delimiter to safely capture multi-line file content. - delimiter="EOF_${RANDOM}_${RANDOM}" - { - printf 'content<<%s\n' "$delimiter" - cat ReleaseAnnouncement.md - printf '%s\n' "$delimiter" - } >> "$GITHUB_OUTPUT" + # Write all PR metadata to a temp file so it can be safely passed to the AI + # via file_input, avoiding any YAML injection from PR body content. + printf 'PR #%s — %s\nby @%s\n\n%s\n' \ + "$PR_NUMBER" "$PR_TITLE" "$PR_AUTHOR" "$PR_BODY" \ + > "${RUNNER_TEMP}/pr_info.txt" - name: Update Release Announcement with GitHub Copilot id: update-announcement if: steps.check-skip.outputs.skip == 'false' uses: actions/ai-inference@v1 with: - model: openai/gpt-4o-mini - system-prompt: | - You are a technical writer maintaining the Release Announcement for Jamulus — - a free, open-source application that lets musicians rehearse, perform, and jam - together in real time over the internet. - - The Release Announcement is a curated, user-friendly document for two audiences: - - 1. **Client users** — musicians who use the Jamulus client application to play - with others online. They care about improved sound quality, new UI features, - connection improvements, new instruments or chat features, and bug fixes that - affect their playing experience. - - 2. **Server operators** — people who run Jamulus servers to host sessions. - They care about stability improvements, new configuration options, resource - usage changes, new administration tools (such as JSON-RPC additions), and - security fixes. - - Rules: - - Write in clear, friendly, non-technical language for these two audiences. - - Add content under the correct heading: "For Client Users", - "For Server Operators", or "For Platform-Specific Changes". - - Use bullet points (- ) for individual changes within each section. - - Only include changes that are relevant and meaningful to these audiences. - - Omit internal/developer-only changes such as build system updates, CI changes, - code style fixes, tooling improvements, and dependency bumps unless they have - a direct, noticeable impact on users. - - Preserve and improve existing content — do not remove or overwrite it. - - If the PR introduces no changes relevant to these audiences, return the current - announcement completely unchanged. - - Output the COMPLETE updated Markdown document and nothing else. - prompt: | - Current Release Announcement: - --- - ${{ steps.read-announcement.outputs.content }} - --- - - Newly merged pull request #${{ github.event.pull_request.number }}: - Title: ${{ github.event.pull_request.title }} - Author: @${{ github.event.pull_request.user.login }} - - PR description: - ${{ github.event.pull_request.body }} - --- - - Update the Release Announcement to include any changes from this PR that are - relevant to Client users or Server operators. Return the complete updated - Markdown document only. + prompt-file: '.github/prompts/release-announcement.prompt.yml' + file_input: | + current_announcement: ReleaseAnnouncement.md + pr_info: ${{ runner.temp }}/pr_info.txt - name: Write updated Release Announcement if: steps.check-skip.outputs.skip == 'false' - env: - UPDATED_CONTENT: ${{ steps.update-announcement.outputs.response }} run: | - printf '%s\n' "$UPDATED_CONTENT" > ReleaseAnnouncement.md + cp "${{ steps.update-announcement.outputs.response-file }}" ReleaseAnnouncement.md - name: Commit and push updated announcement if: steps.check-skip.outputs.skip == 'false' @@ -138,3 +103,50 @@ jobs: git diff --staged --quiet && exit 0 git commit -m "docs: update Release Announcement for PR #${{ github.event.pull_request.number }}" git push + + reset-after-release: + name: Reset announcement after full release + # Only run on tag pushes in the main jamulussoftware repo. + if: >- + github.repository_owner == 'jamulussoftware' && + github.event_name == 'push' + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v6 + with: + ref: main + + - name: Check if this is a full (non-prerelease) release tag + id: check-tag + run: | + # Match only clean version tags like r3_12_0. + # Tags with any suffix (e.g. r3_12_0beta1, r3_12_0rc1) are pre-releases + # and intentionally do NOT reset the draft, so it keeps building up + # towards the final release announcement. + if [[ "${GITHUB_REF_NAME}" =~ ^r([0-9]+)_([0-9]+)_([0-9]+)$ ]]; then + echo "is_full_release=true" >> "$GITHUB_OUTPUT" + echo "version=${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}" >> "$GITHUB_OUTPUT" + else + echo "is_full_release=false" >> "$GITHUB_OUTPUT" + fi + + - name: Reset Release Announcement to template + if: steps.check-tag.outputs.is_full_release == 'true' + run: | + cp .github/release-announcement-template.md ReleaseAnnouncement.md + + - name: Commit and push reset announcement + if: steps.check-tag.outputs.is_full_release == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.email "actions@github.com" + git config --global user.name "github-actions[bot]" + git add ReleaseAnnouncement.md + git diff --staged --quiet && exit 0 + git commit -m "docs: reset Release Announcement after v${{ steps.check-tag.outputs.version }} release" + git push + diff --git a/ReleaseAnnouncement.md b/ReleaseAnnouncement.md index e0d299b63f..0a8713d662 100644 --- a/ReleaseAnnouncement.md +++ b/ReleaseAnnouncement.md @@ -1,29 +1,25 @@ -# Jamulus Next Release — Working Announcement +# Jamulus Next Release — Working Announcement Draft -> **Note for maintainers:** This is a working draft that is automatically updated by -> GitHub Copilot whenever a pull request is merged to `main`. It is intentionally -> separate from the [ChangeLog](ChangeLog), which is a complete technical record of -> every merged PR. This document is curated for **Client users** (musicians) and -> **Server operators**, covering only the changes that are relevant to them. -> Please review and polish this document before publishing the official release announcement. +> **Note for maintainers:** This is a working draft, automatically updated by GitHub Copilot +> as PRs are merged to `main`. Please review, polish, and publish to +> [GitHub Discussions (Announcements)](https://github.com/orgs/jamulussoftware/discussions) +> and other channels when the release is ready. +> +> Run [`tools/get_release_contributors.py`](tools/get_release_contributors.py) to compile +> the full contributor list before publishing. +> +> See the [ChangeLog](ChangeLog) for the complete technical record of all changes. -## For Client Users +Here's what's new in the next release of Jamulus: - + -## For Server Operators +As always, all feedback on the new version is welcome. Please raise any problems in a new bug report or discussion topic. - - -## Platform-Specific Changes +--- - +**REMINDER:** Those of you with virus checkers are likely to find the Windows installer incorrectly flagged as a virus. This is because the installer is open source and virus checkers cannot be bothered to check what it installs, so assume that it's going to be malign. If you download the installer _only from the official release_, you should be safe to ignore any warning. --- -*This announcement is automatically maintained by the -[Update Release Announcement](.github/workflows/update-release-announcement.yml) workflow. -See the [ChangeLog](ChangeLog) for the full list of all merged changes.* +*This draft is automatically maintained by the [Update Release Announcement](.github/workflows/update-release-announcement.yml) workflow.* From 43f1b5a66144fe1d385bd652f583b12cbdc0451b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 12:30:37 +0000 Subject: [PATCH 4/5] fix: prevent truncation, add robustness, document CHANGELOG/Release Announcement link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix critical truncation bug: add modelParameters (maxCompletionTokens: 16384, temperature: 0.1) to release-announcement.prompt.yml — actions/ai-inference defaults max-tokens to only 200, which would cut off the document mid-write - Add non-empty guard in workflow before overwriting ReleaseAnnouncement.md with the AI response, preventing accidental wipe on empty/missing model output - Use intermediate variables for BASH_REMATCH capture groups in reset-after-release job for clarity - CONTRIBUTING.md: mention that the CHANGELOG: line also feeds ReleaseAnnouncement.md and that CHANGELOG: SKIP skips both - pull_request_template.md: extend CHANGELOG comment to reference Release Announcement Co-authored-by: pljones <1549463+pljones@users.noreply.github.com> --- .github/prompts/release-announcement.prompt.yml | 6 ++++++ .github/pull_request_template.md | 2 +- .github/workflows/update-release-announcement.yml | 14 ++++++++++++-- CONTRIBUTING.md | 2 ++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/prompts/release-announcement.prompt.yml b/.github/prompts/release-announcement.prompt.yml index 3bcf12caf3..ce879bde8f 100644 --- a/.github/prompts/release-announcement.prompt.yml +++ b/.github/prompts/release-announcement.prompt.yml @@ -60,3 +60,9 @@ messages: Return the complete updated Markdown document only. model: openai/gpt-4o-mini +modelParameters: + # High token limit to ensure the full document is always returned without truncation. + # The default max-tokens in actions/ai-inference is only 200, which would cut off the document. + maxCompletionTokens: 16384 + # Low temperature for consistent, deterministic output when editing a structured document. + temperature: 0.1 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d267c12c91..025fe36750 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,7 +4,7 @@ -CHANGELOG: +CHANGELOG: **Context: Fixes an issue?** diff --git a/.github/workflows/update-release-announcement.yml b/.github/workflows/update-release-announcement.yml index f82cc15678..10e396e527 100644 --- a/.github/workflows/update-release-announcement.yml +++ b/.github/workflows/update-release-announcement.yml @@ -88,8 +88,15 @@ jobs: - name: Write updated Release Announcement if: steps.check-skip.outputs.skip == 'false' + env: + RESPONSE_FILE: ${{ steps.update-announcement.outputs.response-file }} run: | - cp "${{ steps.update-announcement.outputs.response-file }}" ReleaseAnnouncement.md + # Guard against an empty or missing response, which would wipe the file. + if [ ! -s "$RESPONSE_FILE" ]; then + echo "Warning: AI returned an empty response — skipping update." + exit 0 + fi + cp "$RESPONSE_FILE" ReleaseAnnouncement.md - name: Commit and push updated announcement if: steps.check-skip.outputs.skip == 'false' @@ -127,8 +134,11 @@ jobs: # and intentionally do NOT reset the draft, so it keeps building up # towards the final release announcement. if [[ "${GITHUB_REF_NAME}" =~ ^r([0-9]+)_([0-9]+)_([0-9]+)$ ]]; then + major="${BASH_REMATCH[1]}" + minor="${BASH_REMATCH[2]}" + patch="${BASH_REMATCH[3]}" echo "is_full_release=true" >> "$GITHUB_OUTPUT" - echo "version=${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}" >> "$GITHUB_OUTPUT" + echo "version=${major}.${minor}.${patch}" >> "$GITHUB_OUTPUT" else echo "is_full_release=false" >> "$GITHUB_OUTPUT" fi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df801e67b0..b1601559b2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,6 +100,8 @@ Admins reserve the right to do this as they see fit. The ChangeLog must be updated for each new feature or bug fix. Please include a single-sentence suggestion for that as part of your pull request description after the `CHANGELOG: ` keyword. Do not modify the ChangeLog file as part of your PR as it will lead to conflicts. +The same `CHANGELOG:` line is also used to automatically update the working [Release Announcement draft](ReleaseAnnouncement.md), which is a curated summary for end users and server operators. Use `CHANGELOG: SKIP` to skip both the ChangeLog entry and the Release Announcement update for purely internal changes (CI, build system, code style fixes, etc.). + If you are a first-time contributor/translator, please add your name to the contributors/translators list in the About dialog of Jamulus (see in `src/util.cpp` in the constructor function `CAboutDlg::CAboutDlg()`). ### Merging pull requests From 2cc3a2e0c8b7677f8b528ab34ef9a511780fd8a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 13:00:08 +0000 Subject: [PATCH 5/5] feat: update ReleaseAnnouncement.md on autobuild branch push Add a new update-announcement-on-autobuild job to update-release-announcement.yml that runs whenever a developer pushes to an autobuild** branch. The job checks out the pushed branch, reads the HEAD commit's message (honouring CHANGELOG: SKIP), writes commit metadata to a temp file via env vars (safe from YAML injection), calls actions/ai-inference@v1 with the same prompt used for PR merges, then commits the updated ReleaseAnnouncement.md back to the branch. Loop prevention: the job-level if skips when github.actor == 'github-actions[bot]'. autobuild.yml already has ReleaseAnnouncement.md in paths-ignore, so the bot commit never re-triggers a build run. Co-authored-by: pljones <1549463+pljones@users.noreply.github.com> --- .../workflows/update-release-announcement.yml | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/.github/workflows/update-release-announcement.yml b/.github/workflows/update-release-announcement.yml index 10e396e527..913ab10569 100644 --- a/.github/workflows/update-release-announcement.yml +++ b/.github/workflows/update-release-announcement.yml @@ -7,6 +7,10 @@ name: Update Release Announcement # changes from that PR, in the same conversational bullet-point style used in real # Jamulus beta/release announcements on GitHub Discussions. # +# On every push to an autobuild* branch: GitHub Copilot updates the draft on that branch +# with any user-relevant changes from the HEAD commit. This lets developers preview how +# their changes would appear in the announcement before the PR is merged. +# # On every full release tag (r__, no suffix): the draft is reset to the pristine # template, ready for the next development cycle. Pre-release tags (beta, rc) do NOT reset # the draft, so it can continue to build up until the final release. @@ -25,6 +29,8 @@ on: branches: - main push: + branches: + - "autobuild**" tags: - "r*" @@ -111,6 +117,91 @@ jobs: git commit -m "docs: update Release Announcement for PR #${{ github.event.pull_request.number }}" git push + update-announcement-on-autobuild: + name: Update announcement for autobuild push + # Run on autobuild branch pushes in the main jamulussoftware repo. + # Skip when the pusher is the bot itself to prevent an infinite commit loop: + # autobuild.yml already has ReleaseAnnouncement.md in paths-ignore, so the + # bot commit will not re-trigger the build, but it would re-trigger this workflow. + if: >- + github.repository_owner == 'jamulussoftware' && + startsWith(github.ref, 'refs/heads/autobuild') && + github.actor != 'github-actions[bot]' + runs-on: ubuntu-latest + permissions: + contents: write + models: read + + steps: + - uses: actions/checkout@v6 + with: + # Check out the autobuild branch being pushed, so the announcement is + # updated and committed directly on that branch. + ref: ${{ github.ref }} + + - name: Check if announcement update should be skipped + id: check-skip + env: + COMMIT_MESSAGE: ${{ github.event.head_commit.message }} + run: | + # Skip when the commit message explicitly marks the change as not user-facing. + if printf '%s\n' "$COMMIT_MESSAGE" | grep -qE '^CHANGELOG:[[:space:]]*SKIP[[:space:]]*$'; then + echo "Skipping: commit is marked CHANGELOG: SKIP" + echo "skip=true" >> "$GITHUB_OUTPUT" + else + echo "skip=false" >> "$GITHUB_OUTPUT" + fi + + - name: Prepare commit metadata for AI prompt + id: prep-commit-info + if: steps.check-skip.outputs.skip == 'false' + env: + COMMIT_SHA: ${{ github.event.head_commit.id }} + COMMIT_MESSAGE: ${{ github.event.head_commit.message }} + COMMIT_AUTHOR: ${{ github.event.head_commit.author.username }} + BRANCH_NAME: ${{ github.ref_name }} + run: | + # Write commit metadata to a temp file so it can be safely passed to the AI + # via file_input, avoiding any YAML injection from the commit message content. + printf 'Commit %s on branch %s\nby @%s\n\n%s\n' \ + "$COMMIT_SHA" "$BRANCH_NAME" "$COMMIT_AUTHOR" "$COMMIT_MESSAGE" \ + > "${RUNNER_TEMP}/commit_info.txt" + + - name: Update Release Announcement with GitHub Copilot + id: update-announcement + if: steps.check-skip.outputs.skip == 'false' + uses: actions/ai-inference@v1 + with: + prompt-file: '.github/prompts/release-announcement.prompt.yml' + file_input: | + current_announcement: ReleaseAnnouncement.md + pr_info: ${{ runner.temp }}/commit_info.txt + + - name: Write updated Release Announcement + if: steps.check-skip.outputs.skip == 'false' + env: + RESPONSE_FILE: ${{ steps.update-announcement.outputs.response-file }} + run: | + # Guard against an empty or missing response, which would wipe the file. + if [ ! -s "$RESPONSE_FILE" ]; then + echo "Warning: AI returned an empty response — skipping update." + exit 0 + fi + cp "$RESPONSE_FILE" ReleaseAnnouncement.md + + - name: Commit and push updated announcement + if: steps.check-skip.outputs.skip == 'false' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.email "actions@github.com" + git config --global user.name "github-actions[bot]" + git add ReleaseAnnouncement.md + # Exit cleanly if the AI returned the document unchanged (nothing to commit). + git diff --staged --quiet && exit 0 + git commit -m "docs: update Release Announcement for ${{ github.sha }}" + git push + reset-after-release: name: Reset announcement after full release # Only run on tag pushes in the main jamulussoftware repo.