|
1 | | -# Release notes |
| 1 | +# Release Notes |
2 | 2 |
|
3 | | -Our release notes pages are specific to GitHub Enterprise Server (GHES). These pages list the change contained in each version of GHES. |
| 3 | +This module manages the fetching, processing, and rendering of GitHub Enterprise Server (GHES) release notes. These notes are displayed on dedicated pages (e.g., `/en/enterprise-server@3.19/admin/release-notes`) and list the features, bug fixes, and known issues for each patch release. |
| 4 | + |
| 5 | +## Purpose & Scope |
| 6 | + |
| 7 | +The primary goal is to: |
| 8 | +- **Parse Release Data**: Read structured YAML data containing release notes. |
| 9 | +- **Format & Sort**: Organize notes by version (major.minor) and patch level. |
| 10 | +- **Render Content**: Process Markdown and Liquid within the notes. |
| 11 | +- **Contextualize**: Inject the processed notes into the page context for rendering by React components. |
| 12 | + |
| 13 | +## Architecture |
| 14 | + |
| 15 | +### Data Source |
| 16 | + |
| 17 | +Release notes are stored in the `data/release-notes/enterprise-server` directory. |
| 18 | +- **Origin**: The content is sourced externally and synced to this repository. |
| 19 | +- **Format**: YAML files organized by version. |
| 20 | +- **Structure**: Each file contains entries for patch releases, including sections for "Features", "Bugs", "Security", etc. |
| 21 | + |
| 22 | +### Middleware |
| 23 | + |
| 24 | +The core logic resides in `src/release-notes/middleware/ghes-release-notes.ts`. |
| 25 | +- **Route Detection**: It activates only for GHES release notes pages or the Admin landing page. |
| 26 | +- **Data Retrieval**: Fetches raw data using `getReleaseNotes`. |
| 27 | +- **Forced English**: Currently, it forces the content language to English (`en`) during rendering. This is a workaround because the source Markdown often lacks Liquid variables for product names, leading to undesirable translations of proper nouns (e.g., "GitHub Copilot" becoming translated literally). |
| 28 | +- **Rendering**: Uses `renderPatchNotes` to process the Markdown/Liquid content of each note. |
| 29 | + |
| 30 | +### Library |
| 31 | + |
| 32 | +`src/release-notes/lib/release-notes-utils.ts` provides helper functions: |
| 33 | +- **`formatReleases`**: Sorts releases and patches semantically (using `semver`). It transforms the raw data into a structured array suitable for the UI. |
| 34 | +- **`renderPatchNotes`**: Iterates through sections (features, bugs, etc.) and renders the content strings. |
| 35 | + |
| 36 | +### Components |
| 37 | + |
| 38 | +The frontend rendering is handled by React components in `src/release-notes/components`: |
| 39 | +- **`GHESReleaseNotes.tsx`**: The main container. |
| 40 | +- **`PatchNotes.tsx`**: Renders the details of a specific patch. |
| 41 | + |
| 42 | +## Maintenance |
| 43 | + |
| 44 | +### Sourcing |
| 45 | + |
| 46 | +Release notes are received from an external source. **Do not manually create or edit release note files in this repository** unless specifically instructed to do so by the release process or for testing purposes. |
| 47 | + |
| 48 | +The files in `data/release-notes` are the destination for this external data. |
| 49 | + |
| 50 | +### URL Structure |
| 51 | + |
| 52 | +- **Page**: `/en/enterprise-server@<version>/admin/release-notes` |
| 53 | +- **Anchor**: `#3.19.1` (Links to specific patch notes) |
| 54 | + |
| 55 | +## Dependencies |
| 56 | + |
| 57 | +- **`semver`**: Used for sorting and comparing version strings. |
| 58 | +- **`src/versions`**: Used to determine supported GHES versions (`latestStable`, `all`). |
| 59 | +- **`src/content-render`**: Used to render the Markdown content within the notes. |
| 60 | + |
| 61 | +## Ownership |
| 62 | + |
| 63 | +- **Team**: `@github/docs-engineering` |
| 64 | +- **Content Owners**: The Writers and Release Managers responsible for the GHES release process. |
| 65 | + |
| 66 | +## Current State & Known Issues |
| 67 | + |
| 68 | +- **Translation Workaround**: As mentioned, we currently force English rendering for release notes to avoid "over-translation" of product names. This is a known limitation until the source data is updated to use proper Liquid variables. |
| 69 | +- **Legacy Redirects**: The middleware handles redirects for very old versions (pre-2.20) to `enterprise.github.com`. |
0 commit comments