Skip to content

fix: move protected files details section inside alert block#23702

Merged
pelikhan merged 1 commit intomainfrom
copilot/move-file-list-to-alert-section
Mar 31, 2026
Merged

fix: move protected files details section inside alert block#23702
pelikhan merged 1 commit intomainfrom
copilot/move-file-list-to-alert-section

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

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] block
  • manifest_protection_create_pr_fallback.md — moved <details> (file list) inside the > [!WARNING] block
  • manifest_protection_push_to_pr_fallback.md — moved <details> (file list) inside the > [!WARNING] block

All <details> lines are now prefixed with > so they render as part of the GitHub alert callout.

@pelikhan pelikhan marked this pull request as ready for review March 31, 2026 12:49
Copilot AI review requested due to automatic review settings March 31, 2026 12:49
@pelikhan pelikhan merged commit 9d353fe into main Mar 31, 2026
105 of 150 checks passed
@pelikhan pelikhan deleted the copilot/move-file-list-to-alert-section branch March 31, 2026 12:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +12 to +13
>
> {files}
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{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.

Suggested change
>
> {files}
>
> ```text
> {files}
> ```

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +15
> <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.
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{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).

Copilot uses AI. Check for mistakes.
> <details>
> <summary>Protected files</summary>
>
> {files}
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{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.

Suggested change
> {files}
{files}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants