Skip to content

feat: Generate Linear release notes from WebGUI tags#2648

Open
elibosley wants to merge 3 commits into
masterfrom
codex/webgui-linear-release-notes
Open

feat: Generate Linear release notes from WebGUI tags#2648
elibosley wants to merge 3 commits into
masterfrom
codex/webgui-linear-release-notes

Conversation

@elibosley

@elibosley elibosley commented May 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Generate marker-managed Linear release notes from the active WebGUI tag commit range.
  • Capture PR summaries in the workflow and pass them to the Linear sync script.
  • Include release metadata, PR links, linked Linear issue IDs, FeatureOS links, and commit fallback content.

Validation

  • node --check .github/scripts/sync-linear-release.mjs
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/linear-release.yml"); puts "yaml ok"'

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for coordinating stable and prerelease releases across multiple release tracks, improving version relationship tracking.
    • Enhanced release notes management with automated formatting and synchronization of linked issues and pull requests.
  • Chores

    • Improved release workflow with enhanced GitHub PR metadata collection and integration.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@elibosley, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 47 minutes and 54 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1e4c7409-f965-4a00-a9f3-efd8eb07ba2d

📥 Commits

Reviewing files that changed from the base of the PR and between de06bf8 and 1e0ddeb.

📒 Files selected for processing (2)
  • .github/scripts/sync-linear-release.mjs
  • .github/workflows/linear-release.yml

Walkthrough

This PR enhances Linear release automation to coordinate multiple release tracks and enrich release notes with GitHub PR context. The workflow now collects PR URLs and metadata during commit analysis, passing them to the sync script. The script resolves companion stable and next-prerelease releases, syncs managed release notes incorporating PR summaries and linked issues, and reconciles issue membership across all related releases with state-based carry-forward logic.

Changes

Linear Release Sync Enhancement

Layer / File(s) Summary
Workflow PR metadata collection and wiring
.github/workflows/linear-release.yml
Workflow pins actions/checkout, improves tag range detection (${TAG_NAME}^..${TAG_NAME}), collects GitHub PR URLs and markdown PR summaries, outputs these artifacts with counts, and passes them to the sync script via environment variables.
Script initialization and related release resolution
.github/scripts/sync-linear-release.mjs
New constants define stable release pipeline and channel-specific stage names. Script loads PR URLs and summaries from environment paths, computes stable and optional next-prerelease companion releases via resolveRelatedReleases, and generalizes upsertRelease to update explicit name/version/description/commitSha.
GraphQL schema expansion for release notes
.github/scripts/sync-linear-release.mjs
findRelease, createRelease, and updateRelease GraphQL operations now include releaseNotes object shape (id, title, documentContent, content) in returned release data.
Release notes content synchronization
.github/scripts/sync-linear-release.mjs
Script builds formatted release notes from tag/commit metadata, PR summaries, linked issue IDs, FeatureOS URLs, and (fallback) commit subjects. Creates or updates managed release notes using deterministic HTML comment markers for idempotent repeated runs. Includes utilities for optional file reading, commit-subject extraction with deduping, and marker-safe section rendering.
Multi-release issue synchronization and carry-forward logic
.github/scripts/sync-linear-release.mjs
syncIssuesToRelease now accepts relatedReleases and githubPrUrls for richer issue sources (GitHub PR URLs and all currently linked issues). New syncIssueToReleases replaces single-release logic by reconciling issue membership across primary, stable, and next-prerelease releases; carries issues to next prerelease only if their state is non-terminal. Includes findIssuesForRelease for fetching linked issues, shouldCarryIssueToNextPrerelease for state-based eligibility, and version-derivation helpers.

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions as GitHub Actions
  participant SyncScript as sync-linear-release.mjs
  participant LinearAPI as Linear GraphQL
  GitHubActions->>SyncScript: PR URLs, PR summaries, log paths
  SyncScript->>LinearAPI: resolveRelatedReleases → upsert stable + next-prerelease
  LinearAPI-->>SyncScript: stable & next releases
  SyncScript->>LinearAPI: build release notes from PR summaries + issues
  SyncScript->>LinearAPI: upsert managed release note (HTML markers)
  LinearAPI-->>SyncScript: release note created/updated
  SyncScript->>LinearAPI: for each issue: syncIssueToReleases across primary/stable/next
  LinearAPI-->>SyncScript: issue memberships updated
  SyncScript->>GitHubActions: summary with PR count
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • unraid/webgui#2646: Both update the same Linear sync machinery with multi-release coordination logic for different release channels, extending prior tag-to-OS syncing.
  • unraid/webgui#2644: Both modify .github/workflows/linear-release.yml; this PR extends it with PR URL/summary/log artifact collection and passing.
  • unraid/webgui#2647: Builds on the same Linear release workflow/script changes including checkout pinning, tag-range resolution, and issue syncing refactor via syncIssueToReleases.

Poem

🐇 A script that syncs and knows the way,
Through stable tracks and prerelease play,
With PR notes woven, states reviewed,
Each issue's path through releases grooved,
Linear releases now coordinated with joy!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: Generate Linear release notes from WebGUI tags' clearly and specifically summarizes the main change: adding generation of Linear release notes from WebGUI tag commit ranges, which is the core objective described in the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/webgui-linear-release-notes

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/scripts/sync-linear-release.mjs (1)

540-565: ⚖️ Poor tradeoff

Pagination limit may miss issues for large releases.

findIssuesForRelease fetches only first: 100 issues. If a release has more than 100 linked issues, subsequent issues won't be processed for carry-forward logic.

Consider either documenting this as an acceptable limitation (releases rarely exceed 100 issues) or implementing pagination. For now, this is likely sufficient for the expected scale.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/scripts/sync-linear-release.mjs around lines 540 - 565,
findIssuesForRelease currently requests only the first 100 issues (query uses
issues(first: 100)), which can drop issues for large releases; update the
function (findIssuesForRelease) to paginate through issues using the GraphQL
cursor-based pagination (use issues(first, after) and loop/recursively call
graphql until pageInfo.hasNextPage is false, aggregating nodes) so all linked
issues for the given releaseId are returned, or alternatively add a clear
comment documenting the 100-item limit if you intend to keep the current
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/linear-release.yml:
- Around line 132-151: The loop over PR_NUMBERS lacks handling for failed curl
requests which leaves PR_JSON_PATH empty/invalid and breaks jq/PR_TITLE logic;
after the curl call that writes to PR_JSON_PATH, check its exit status and/or
validate the file (e.g., ensure valid JSON or non-empty) and if the fetch failed
skip this PR_NUMBER with a logged warning, do not run jq or printf for that PR,
and still cleanup PR_JSON_PATH; update the block referencing curl, PR_JSON_PATH,
jq, PR_TITLE and PR_SUMMARY_PATH to perform this validation and early-continue
on failure.

---

Nitpick comments:
In @.github/scripts/sync-linear-release.mjs:
- Around line 540-565: findIssuesForRelease currently requests only the first
100 issues (query uses issues(first: 100)), which can drop issues for large
releases; update the function (findIssuesForRelease) to paginate through issues
using the GraphQL cursor-based pagination (use issues(first, after) and
loop/recursively call graphql until pageInfo.hasNextPage is false, aggregating
nodes) so all linked issues for the given releaseId are returned, or
alternatively add a clear comment documenting the 100-item limit if you intend
to keep the current behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9cbee431-5bff-4bdd-913a-b2fd4db6dda6

📥 Commits

Reviewing files that changed from the base of the PR and between 7b789bb and de06bf8.

📒 Files selected for processing (2)
  • .github/scripts/sync-linear-release.mjs
  • .github/workflows/linear-release.yml

Comment thread .github/workflows/linear-release.yml
Purpose of the change:
- Address review feedback on the WebGUI Linear release workflow while keeping the patch minimal.

Previous behavior:
- The workflow used the mutable actions/checkout@v6 tag.
- Tags without a previous semver tag used RANGE_SPEC equal to the tag name, causing git log to walk full ancestry.
- PR metadata collection only recognized merge commits shaped as Merge pull request #123.

Why that was a problem:
- Mutable action tags can be retargeted upstream.
- A first-tag release could scan unrelated historical commits and attach unrelated Linear metadata.
- Squash-merged PRs with commit messages like Fix thing (#123) would not have their PR body scanned for Linear or FeatureOS links.

What this changes:
- Pins actions/checkout to the current v6.0.2 commit SHA.
- Uses TAG^..TAG for first-tag ranges when a parent exists, with the old tag fallback only for parentless commits.
- Extends PR number extraction to include squash-merge (#123) patterns while preserving numeric extraction, sorting, and dedupe.

How it works:
- The existing PR lookup loop remains unchanged; it receives a broader but still numeric-only PR number list.
- The git range emitted by Resolve tag remains bounded before the later git log call uses it.
Purpose of the change:
- Address review feedback on the WebGUI Linear release workflow PR parsing.

Previous behavior:
- PR number extraction matched both explicit merge commits and any parenthetical number shaped like (#123).

Why that was a problem:
- Ordinary issue references in commit messages could be treated as PR numbers and sent to the GitHub pulls API, causing the workflow to fail.

What this changes:
- Restricts PR number extraction to explicit Merge pull request #123 commit messages.
- Keeps the existing numeric extraction, sort -u dedupe, and || true fallback behavior.

How it works:
- The first grep now emits only Merge pull request #[0-9]+ matches before the second grep extracts digits for the existing curl loop.
- Purpose: let the webgui tag workflow own user-facing Linear release notes for the active tag.\n- Before: the workflow synced Linear releases and issue membership but did not write release notes from the tag's commit or PR range.\n- Problem: stable release notes were being filled by release-diff internals instead of webgui-facing release context.\n- New behavior: the workflow records PR summaries, linked Linear IDs, FeatureOS links, and commit metadata, then syncs an idempotent Version <tag> release note.\n- How it works: the collection step emits PR summary and log paths, and the Node sync script creates or updates a marker-managed Linear release note attached to the active tag release.
@elibosley elibosley force-pushed the codex/webgui-linear-release-notes branch from de06bf8 to 1e0ddeb Compare June 19, 2026 14:42
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.

1 participant