fix: move protected files details section inside alert block#23702
fix: move protected files details section inside alert block#23702
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1f60f5ec-049b-4ef5-bd70-77dad14a18f3 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adjusts the protected-files fallback issue templates so the “Protected files” <details> section renders inside the GitHub [!WARNING] alert block, keeping the file list visually associated with the warning context.
Changes:
- Moved the “Protected files”
<details>block under the[!WARNING]blockquote in three fallback templates. - Prefixed the
<details>/<summary>/closing tags with>to force inclusion within the alert callout.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| actions/setup/md/manifest_protection_push_to_pr_fallback.md | Moves the protected files <details> section inside the warning callout for push-to-PR fallback issues. |
| actions/setup/md/manifest_protection_push_failed_fallback.md | Moves the protected files <details> section (including rejection reason) inside the warning callout for push-failed fallback issues. |
| actions/setup/md/manifest_protection_create_pr_fallback.md | Moves the protected files <details> section inside the warning callout for create-PR fallback issues. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| > | ||
| > {files} |
There was a problem hiding this comment.
{files} is rendered from buildProtectedFileList() as a newline-separated Markdown list. In this blockquote/alert context only the first line is prefixed with >, so any additional list items will render outside the warning callout (and may also break the <details> body). Consider passing a pre-quoted variant (e.g., replace \n with \n> before rendering) or emitting the file list as single-line HTML (e.g., <ul><li>…</li></ul> or <br>-separated) so all items stay inside the alert.
| > | |
| > {files} | |
| > | |
| > ```text | |
| > {files} | |
| > ``` |
| > <details> | ||
| > <summary>Protected files</summary> | ||
| > | ||
| > {files} | ||
| > | ||
| > The push was rejected because GitHub Actions does not have `workflows` permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission. |
There was a problem hiding this comment.
{files} expands to multiple lines (newline-separated Markdown list). With the current template, only the first line is blockquoted (> {files}), so subsequent lines will escape the [!WARNING] alert and won’t appear inside this <details> section. Suggest adjusting the renderer to prefix every line with > (or switch {files} to an HTML representation that doesn’t rely on newlines).
| > <details> | ||
| > <summary>Protected files</summary> | ||
| > | ||
| > {files} |
There was a problem hiding this comment.
{files} is a newline-joined list, but in this quoted alert only the first line is prefixed with >. If more than one protected file is present, the extra lines will render outside the warning callout. Recommend passing an already-quoted {files} value (prefix each line with > ) or changing {files} to a single-line HTML list so the entire file list stays inside the alert/details block.
| > {files} | |
| {files} |
The
<details>Protected files</details>block was rendered outside the> [!WARNING]alert in all three protected-files fallback issue templates, making the file list visually disconnected from the warning context.Changes
manifest_protection_push_failed_fallback.md— moved<details>(file list + rejection reason) inside the> [!WARNING]blockmanifest_protection_create_pr_fallback.md— moved<details>(file list) inside the> [!WARNING]blockmanifest_protection_push_to_pr_fallback.md— moved<details>(file list) inside the> [!WARNING]blockAll
<details>lines are now prefixed with>so they render as part of the GitHub alert callout.