Skip to content

Commit a58ec25

Browse files
authored
docs: include mirror changelog info in developer docs
1 parent 3aa1575 commit a58ec25

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

DEVELOPER.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,40 @@ The primary maintainers for this repository are defined in the
9797
9898
### Releasing
9999
100-
The release process is automated using `release-please`.
100+
The release process is automated using `release-please`. It consists of an automated changelog preparation step followed by the manual merging of a Release PR.
101+
102+
#### Automated Changelog Enrichment
103+
104+
Before a Release PR is even created, a special workflow automatically mirrors relevant changelogs from the core `googleapis/genai-toolbox` dependency. This ensures that the release notes for this extension accurately reflect important upstream changes.
105+
106+
The process is handled by the [`mirror-changelog.yml`](.github/workflows/mirror-changelog.yml) workflow:
107+
108+
1. **Trigger:** The workflow runs automatically on pull requests created by
109+
Renovate for `toolbox` version updates.
110+
2. **Parsing:** It reads the detailed release notes that Renovate includes in
111+
the PR body.
112+
3. **Filtering:** A Node.js script located at
113+
[`.github/scripts/mirror-changelog.js`](.github/scripts/mirror-changelog.js)
114+
filters these release notes to include only changes relevant to this
115+
extension. The relevance is determined by a keyword (e.g., `postgres`), passed
116+
as an environment variable in the workflow file.
117+
4. **Changelog Injection:** The script formats the filtered entries as
118+
conventional commits and injects them into the PR body within a
119+
`BEGIN_COMMIT_OVERRIDE` block.
120+
5. **Release Please:** When the main Release PR is created, `release-please`
121+
reads this override block instead of the standard `chore(deps): ...` commit
122+
message, effectively mirroring the filtered upstream changelog into this
123+
project's release notes.
124+
125+
> **Note for Maintainers:** The filtering script is an automation aid, but it
126+
> may occasionally produce "false positives" (e.g., an internal logging change
127+
> that happens to contain the keyword). Before merging a `toolbox` dependency
128+
> PR, maintainers must **review the generated `BEGIN_COMMIT_OVERRIDE` block**
129+
> and manually delete any lines that are not relevant to the end-users of this
130+
> extension. The curated override block is the final source of truth for the
131+
> release changelog.
132+
133+
#### Release Process
101134

102135
1. **Release PR:** When commits with conventional commit headers (e.g., `feat:`,
103136
`fix:`) are merged into the `main` branch, `release-please` will
@@ -109,3 +142,4 @@ The release process is automated using `release-please`.
109142
`package-and-upload-assets.yml` workflow. This workflow builds the
110143
platform-specific extension archives and uploads them as assets to the
111144
GitHub Release.
145+

0 commit comments

Comments
 (0)