Skip to content

ci: draft release notes in the release PR - #7779

Merged
longcw merged 8 commits into
mainfrom
longc/release-notes
Oct 13, 2026
Merged

longcw merged 8 commits into
mainfrom
longc/release-notes

Conversation

@longcw

@longcw longcw commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

The publish workflow now drafts a release note. The bump job writes a draft from the merged PRs into the release PR body, between <!-- release-notes:start --> and <!-- release-notes:end --> markers. A new release job runs after every package publishes, and creates livekit-agents@X with the reviewed summary above GitHub's generated PR list and contributor credits.

Why the review happens in the release PR:

  • The release PR already has a required review. release-gate.yml blocks the merge until two people approve, so the notes get read by people who are already reading the release. A draft GitHub release sends no notification and blocks nothing.
  • The release job runs only after PyPI publish succeeds. A release never points at packages that are not on PyPI. If the job fails, the release is created by hand, as it is today.

To skip the GitHub release, untick the release_notes input when you dispatch the workflow, or delete the marker block from the release PR body. Versions that end in a, b, rc or dev become pre-releases and never take "Latest". If drafting fails, the release PR still opens with a placeholder in the block.

TODO: no way to re-draft after the release PR opens; reviewers edit the body directly.

Context for reviewing and coding agents

How to see a draft without a release

The script has no side effects. It reads GitHub and prints markdown:

uv run python .github/release_notes.py --tag [email protected] --target 294de277c4 --previous-tag [email protected]

It needs gh auth and the same LLM API key secret that evals.yml already uses.

How the previous tag is found

Both jobs use git describe --tags --abbrev=0 --match 'livekit-agents@*' on the release branch, not GitHub's latest release. On a branch such as agents-2.0, the latest release is a 1.x tag on main, which gives the wrong range. The checkouts use fetch-depth: 0 for this reason.

Why a deleted PR does not fail the draft

PR #6811 is in the 1.8.6 list, but gh pr view 6811 cannot resolve it. The script takes titles from the generated list and fetches bodies only when the PR still exists.

The bump job drafts a summary of the merged PRs into the release PR
body, reviewers edit it there, and a new release job creates the GitHub
release from it after PyPI publish succeeds. The release_notes dispatch
input, or deleting the block, skips the GitHub release.
@longcw
longcw requested a review from a team as a code owner October 13, 2026 08:53

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 3 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

previous=$(git describe --tags --abbrev=0 --match 'livekit-agents@*')
python .github/release_notes.py \
--tag "livekit-agents@${VERSION}" \
--target "$(git rev-parse HEAD)" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Release summary misses later merged changes

When other PRs merge before approval, --target still drafts against the earlier checkout. The release tag uses the later merge commit, so its summary omits changes shipped in that release.

Learn more

The bump job drafts against its original checkout before creating the release PR. A release PR can remain open while other PRs merge into its base branch. On approval, the release PR's merge commit includes those newer changes, and the publish job builds from that merge commit. The PR body's draft remains based on the older commit, so it cannot summarize all shipped changes.

Example: The draft is generated for commit A. PR #123 merges into main before the release PR merges at commit B. Packages at B contain #123, but the release summary only covers changes through A.

Recommended fix: Make the drafted range match the commit ultimately published. Recompute the summary when the release PR incorporates new base changes, or constrain the release contents to the commit used for drafting; validate that the notes' target SHA matches the published merge commit.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 61c307c. The release PR body now gives the commit that the notes cover, and tells reviewers to dispatch the release again to redraft. The GitHub release itself stays complete, because GitHub generates the PR list at release time. Only the summary at the top can lag.

Comment thread .github/workflows/publish.yml Resolved
Comment thread .github/release_notes.py Resolved
The Anthropic key secret is no longer valid; the OpenAI key secret is.
Also narrow what the prompt counts as a breaking change.
devin-ai-integration[bot]

This comment was marked as resolved.

Draft feature sections, a providers list and breaking changes the way
past releases are written, skip the GitHub release when the notes block
is empty, and stop on PR fetch errors other than a deleted PR.
Raised dependency floors, new defaults and corrected behavior go under a
softer behavior changes section.

@chenghao-mou chenghao-mou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

echo
echo "<!-- release-notes:start -->"
cat "$RUNNER_TEMP/release_notes.md" 2>/dev/null || true
echo "<!-- release-notes:end -->"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we added a <details> section with a codeblock so copying the release note can be done in two clicks?

Release note block
# This is formatted markdown

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added it, but the draft in the PR body will be added to the release notes automatically once merged.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, we don't really need the copy it. Feel free to drop it!

Comment thread .github/release_notes.py
- One closing sentence naming the areas that got more reliable, when the release has fixes.

In every section, give one bullet per provider or feature, merging its models or changes into that bullet, like "**Claude Opus 5.5 and Sonnet 5.5**" or one **Speechmatics** bullet that lists each update. Leave out any section that would be empty, and keep the whole text under 250 words unless a headline feature needs its code block. Describe only what the PR titles and bodies support, with no invented APIs, numbers or links, and output only the markdown."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a security section if there is any related changes.

Feature sections go to framework capabilities whose PR shows the call
to adopt them, single-plugin options are left to the PR list, and
models added through a dependency upgrade are listed. Security fixes
get their own section, and the release PR carries a copy block.
@longcw
longcw merged commit ff5c0a0 into main Oct 13, 2026
32 of 33 checks passed
@longcw
longcw deleted the longc/release-notes branch October 13, 2026 15:09
Li-john1021 added a commit to Li-john1021/agents that referenced this pull request Oct 15, 2026
Rebase onto main was blocked (OAuth token lacks workflow scope for
.github/workflows from livekit#7673/livekit#7779). Resolve the conflict in-place:
keep main's generate_reply wrapping for Gemini 3.x and
test_reply_instructions_turns_follow_the_model from livekit#7673; retain
only the Vertex role="system" update_instructions fix and
test_update_instructions_role_for_api.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants