You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Precedence**: explicit CLI arguments always take priority over environment variables. Environment variables are only used when the corresponding CLI argument is not provided.
146
147
148
+
`CHANGELOG_DESCRIPTION` has additional precedence rules related to release note extraction:
149
+
150
+
- If `--description` is provided on the command line, it always wins.
151
+
- If `--no-extract-release-notes` is passed (or `extract.release_notes: false` is set in the changelog configuration), `CHANGELOG_DESCRIPTION` is ignored. This prevents a description that was extracted by `evaluate-pr` from being applied when extraction has been disabled.
152
+
- Otherwise, `CHANGELOG_DESCRIPTION` fills `--description` when it is not set on the command line.
153
+
147
154
The filename strategy is controlled by the `filename` option in `changelog.yml` (defaulting to `timestamp`). Refer to [changelog.example.yml](https://github.com/elastic/docs-builder/blob/main/config/changelog.example.yml) for details.
148
155
149
156
This allows the CI action to invoke `changelog add` with a minimal command line:
Copy file name to clipboardExpand all lines: docs/cli/changelog/bundle.md
+9-20Lines changed: 9 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,9 +97,6 @@ The `--input-products` option determines which changelog files are gathered for
97
97
: Each occurrence can be either comma-separated issues ( `--issues "https://github.com/owner/repo/issues/123,456"`) or a file path (for example `--issues /path/to/file.txt`).
98
98
: When using a file, every line must be a fully-qualified GitHub issue URL such as `https://github.com/owner/repo/issues/123`. Bare numbers and short forms are not allowed in files.
99
99
100
-
`--no-sanitize-private-links`
101
-
: Optional: Explicitly turn off the `sanitize_private_links` option if it's specified in the changelog configuration file.
102
-
103
100
`--no-resolve`
104
101
: Optional: Explicitly turn off the `resolve` option if it's specified in the changelog configuration file.
105
102
@@ -140,13 +137,6 @@ The `--input-products` option determines which changelog files are gathered for
140
137
: Optional: Copy the contents of each changelog file into the entries array.
141
138
: By default, the bundle contains only the file names and checksums.
142
139
143
-
`--sanitize-private-links`
144
-
: Optional: Turn on [private link sanitization](#private-link-sanitization).
145
-
: Pull requests and issues that target repositories marked `private: true` in the `references` section of `assembler.yml` are rewritten as quoted `# PRIVATE:` sentinel strings in the bundle file.
146
-
: This option requires a resolved bundle: use `--resolve` or set `bundle.resolve: true` in the `changelog.yml`.
147
-
: If sanitization is enabled and the bundle is not resolved, the command fails.
148
-
: When you omit this option, it defaults to `bundle.sanitize_private_links` in your changelog configuration file, which defaults to `false`.
149
-
150
140
## Output files
151
141
152
142
Both modes use the same ordered fallback to determine where to write the bundle. The first value that is set wins:
@@ -284,27 +274,26 @@ rules:
284
274
- "Monitoring"
285
275
```
286
276
287
-
## Private link sanitization [private-link-sanitization]
277
+
## PR and issue link allowlist [link-allowlist]
288
278
289
-
A changelog in a public repository might contain links to pull requests or issues in private repositories.
290
-
To prevent that information from appearing in the documentation, use `bundle.sanitize_private_links` in the changelog configuration file (or a product-specific profile override) or the `--sanitize-private-links` command option.
279
+
A changelog in a public repository might contain links to pull requests or issues in repositories that should not appear in published documentation.
291
280
292
-
This feature relies on the [`assembler.yml`](/configure/site/content.md) file and the existence of `private: true` to determine which repo links should be sanitized.
293
-
Every repository that appears in a PR or issue link must be listed under `assembler.yml` `references`. References to unknown repositories fail the command so you can fix the registry.
294
-
Repos are assumed to be `private: false` unless you specify otherwise.
281
+
Set `bundle.link_allow_repos` in `changelog.yml` to an explicit list of `owner/repo` strings (for example, `elastic/elasticsearch`). When this key is present (including as an empty list), PR and issue references are filtered at bundle time: only links whose resolved repository is in the list are kept; others are rewritten to quoted `# PRIVATE:` sentinel strings in the bundle YAML.
295
282
296
283
:::{important}
297
-
When you use these options, you must also set `bundle.resolve: true` or specify `--resolve`.
298
-
Unresolved bundles that only store `file:` pointers do not get this rewrite; if you need private link sanitization, you must use a resolved bundle.
284
+
`bundle.link_allow_repos` requires a **resolved** bundle. Set `bundle.resolve: true` or pass `--resolve`. Unresolved bundles that only store `file:` pointers are not rewritten.
299
285
:::
300
286
301
-
The `changelog bundle`, `changelog gh-release`, and `changelog bundle-amend` commands rewrite PR and issue references that **target** private repositories into quoted sentinel strings such as `"# PRIVATE: …"` in the bundle file.
302
-
The changelog directive and `changelog render` command then omit these sentinels from the documentation.
287
+
When [`assembler.yml`](/configure/site/content.md) is available, docs-builder emits **warnings** (non-fatal) if an allowlisted repo is missing from `references` or is marked `private: true`, so you can verify the registry before publishing.
288
+
289
+
The `changelog bundle`, `changelog gh-release`, and `changelog bundle-amend` commands apply the same rules. The changelog directive and `changelog render` command omit `# PRIVATE:` sentinels from rendered documentation.
303
290
304
291
:::{warning}
305
292
Sentinel values are omitted from rendered documentation but remain in bundle files; they are not cryptographic redaction.
306
293
:::
307
294
295
+
`bundle.repo`must name a **single** GitHub repository (do not use `repo1+repo2` merged-repo syntax).
|`should-generate`|`true` if `changelog add` should run |
67
67
|`should-upload`|`true` if the artifact should be uploaded |
68
68
|`title`| Resolved PR title |
69
+
|`description`| Release note extracted from the PR body (when `extract.release_notes` is enabled and a release note is found). Long or multi-line release notes (>120 characters) are placed here. Passed downstream as `CHANGELOG_DESCRIPTION` for `changelog add`. |
69
70
|`type`| Resolved changelog type |
70
71
|`products`| Comma-separated product specs resolved from PR labels via `pivot.products` mappings (e.g., `cloud-hosted, cloud-serverless`) |
71
72
|`label-table`| Markdown table of configured label-to-type mappings |
Copy file name to clipboardExpand all lines: docs/contribute/changelog.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -363,6 +363,17 @@ Ideally this task will be automated such that it's performed by a bot or GitHub
363
363
If you run it from the command line, you must precede any special characters (such as backquotes) with a backslash escape character (`\`).
364
364
:::
365
365
366
+
### CI two-step flow
367
+
368
+
When automated via the [changelog GitHub Actions](https://github.com/elastic/docs-actions/tree/main/changelog), changelog creation is a two-step process:
369
+
370
+
1. **`changelog evaluate-pr`** inspects the PR (title, labels, body) and produces outputs such as `title`, `type`, `description`, and `products`.
371
+
2. **`changelog add`** reads those outputs from `CHANGELOG_*` environment variables and generates the changelog YAML file.
372
+
373
+
The `description` output from step 1 contains the release note extracted from the PR body (when `extract.release_notes` is enabled). If extraction is disabled — either by setting `extract.release_notes: false` in `changelog.yml` or by passing `--no-extract-release-notes` to `changelog add` — the `CHANGELOG_DESCRIPTION` environment variable is ignored and the extracted description is not written to the changelog.
374
+
375
+
Refer to [CI auto-detection](/cli/changelog/add.md#ci-auto-detection) for the full list of environment variables and precedence rules.
376
+
366
377
For up-to-date command usage information, use the `-h` option or refer to [](/cli/changelog/add.md).
367
378
368
379
### Authorization
@@ -713,8 +724,8 @@ Top-level `bundle` fields:
713
724
|---|---|
714
725
| `repo` | Default GitHub repository name applied to all profiles. Falls back to product ID if not set at any level. |
715
726
| `owner` | Default GitHub repository owner applied to all profiles. |
716
-
| `resolve` | When `true`, embeds full changelog entry content in the bundle (same as `--resolve`). Required when `sanitize_private_links` is enabled. |
717
-
| `sanitize_private_links` | When `true`, rewrites PR/issue references that target private repositories (per `assembler.yml` `references`) to quoted `# PRIVATE:` sentinel strings in bundle YAML. Requires `resolve: true` and a non-empty `references` section in `assembler.yml`. Default `false`. Refer to [Private link sanitization at bundle time](/cli/changelog/bundle.md#private-link-sanitization). |
727
+
| `resolve` | When `true`, embeds full changelog entry content in the bundle (same as `--resolve`). Required when `link_allow_repos` is set. |
728
+
| `link_allow_repos` | When set (including an empty list), only PR/issue links whose resolved repository is in this `owner/repo` list are kept; others are rewritten to `# PRIVATE:` sentinels in bundle YAML. When absent, no link filtering is applied. Requires `resolve: true`. Refer to [PR and issue link allowlist](/cli/changelog/bundle.md#link-allowlist). |
718
729
719
730
Profile configuration fields in `bundle.profiles`:
720
731
@@ -727,7 +738,6 @@ Profile configuration fields in `bundle.profiles`:
727
738
| `repo` | Optional. Overrides `bundle.repo` for this profile only. Required when `source: github_release` is used and no `bundle.repo` is set. |
728
739
| `owner` | Optional. Overrides `bundle.owner` for this profile only. |
729
740
| `hide_features` | List of feature IDs to embed in the bundle as hidden. |
730
-
| `sanitize_private_links` | Optional. Overrides `bundle.sanitize_private_links` for this profile. |
731
741
732
742
Example profile configuration:
733
743
@@ -1048,7 +1058,7 @@ The `--hide-features` option on the `render` command and the `hide-features` fie
1048
1058
1049
1059
A changelog can reference multiple pull requests and issues in the `prs` and `issues` array fields.
1050
1060
1051
-
To comment out the private links in all changelogs in your bundles, refer to [changelog bundle](/cli/changelog/bundle.md#private-link-sanitization).
1061
+
To comment out links that are not in your allowlist in all changelogs in your bundles, refer to [changelog bundle](/cli/changelog/bundle.md#link-allowlist).
1052
1062
1053
1063
If you are working in a private repo and do not want any pull request or issue links to appear (even if they target a public repo), you also have the option to configure link visibiblity in the [changelog directive](/syntax/changelog.md) and [changelog render](/cli/changelog/render.md) command.
The command automatically discovers `changelog.yml` by checking `./changelog.yml` then `./docs/changelog.yml` relative to your current directory.
1297
1307
If no configuration file is found, the command returns an error with advice to create one or to run from the directory where the file exists.
1298
1308
1299
-
The `output`, `output_products`, `hide_features`, `sanitize_private_links`, and `resolve` fields are bundle-specific and are always ignored for removal (along with other bundle-only settings that do not affect which changelog files match the filter).
1309
+
The `output`, `output_products`, `hide_features`, `link_allow_repos`, and `resolve` fields are bundle-specific and are always ignored for removal (along with other bundle-only settings that do not affect which changelog files match the filter).
1300
1310
Which other fields are used depends on the profile type:
1301
1311
1302
1312
- Standard profiles: only the `products` field is used. The `repo` and `owner` fields are ignored (they only affect bundle output metadata).
0 commit comments