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
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).
Copy file name to clipboardExpand all lines: docs/contribute/changelog.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -712,8 +712,8 @@ Top-level `bundle` fields:
712
712
|---|---|
713
713
| `repo` | Default GitHub repository name applied to all profiles. Falls back to product ID if not set at any level. |
714
714
| `owner` | Default GitHub repository owner applied to all profiles. |
715
-
| `resolve` | When `true`, embeds full changelog entry content in the bundle (same as `--resolve`). Required when `sanitize_private_links` is enabled. |
716
-
| `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). |
715
+
| `resolve` | When `true`, embeds full changelog entry content in the bundle (same as `--resolve`). Required when `link_allow_repos` is set. |
716
+
| `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). |
717
717
718
718
Profile configuration fields in `bundle.profiles`:
719
719
@@ -726,7 +726,6 @@ Profile configuration fields in `bundle.profiles`:
726
726
| `repo` | Optional. Overrides `bundle.repo` for this profile only. Required when `source: github_release` is used and no `bundle.repo` is set. |
727
727
| `owner` | Optional. Overrides `bundle.owner` for this profile only. |
728
728
| `hide_features` | List of feature IDs to embed in the bundle as hidden. |
729
-
| `sanitize_private_links` | Optional. Overrides `bundle.sanitize_private_links` for this profile. |
730
729
731
730
Example profile configuration:
732
731
@@ -1047,7 +1046,7 @@ The `--hide-features` option on the `render` command and the `hide-features` fie
1047
1046
1048
1047
A changelog can reference multiple pull requests and issues in the `prs` and `issues` array fields.
1049
1048
1050
-
To comment out the private links in all changelogs in your bundles, refer to [changelog bundle](/cli/changelog/bundle.md#private-link-sanitization).
1049
+
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).
1051
1050
1052
1051
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.
1296
1295
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.
1297
1296
1298
-
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).
1297
+
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).
1299
1298
Which other fields are used depends on the profile type:
1300
1299
1301
1300
- Standard profiles: only the `products` field is used. The `repo` and `owner` fields are ignored (they only affect bundle output metadata).
"Private link sanitization requires the parent bundle to already reflect sanitized PR/issue references. "+
207
-
"Re-create the parent bundle with bundle.sanitize_private_links enabled and resolve enabled, "+
208
-
"or disable bundle.sanitize_private_links for amend.");
184
+
"bundle.link_allow_repos requires the parent bundle to already reflect filtered PR/issue references. "+
185
+
"Re-create the parent bundle with the same bundle.link_allow_repos and resolve enabled, "+
186
+
"or remove bundle.link_allow_repos for amend.");
209
187
returnfalse;
210
188
}
211
189
}
212
190
213
-
if(sanitizePrivateLinks&&!shouldResolve)
191
+
if(linkAllowlistActive&&!shouldResolve)
214
192
{
215
193
collector.EmitError(
216
194
string.Empty,
217
-
"Private link sanitization requires resolved amend content. Use --resolve or ensure the original bundle is resolved, or disable bundle.sanitize_private_links.");
195
+
"bundle.link_allow_repos requires resolved amend content. Use --resolve or ensure the original bundle is resolved, or remove bundle.link_allow_repos.");
218
196
returnfalse;
219
197
}
220
198
@@ -236,23 +214,38 @@ public async Task<bool> AmendBundle(IDiagnosticsCollector collector, AmendBundle
0 commit comments