-
Notifications
You must be signed in to change notification settings - Fork 354
Fix empty guard alert blocks in Workflow Health Dashboard issue output #27202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
fc74749
3b54a68
e0e128c
05a15ac
a8f94d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,12 +91,14 @@ function generateDifcFilteredSection(filteredEvents) { | |
|
|
||
| const count = uniqueEvents.length; | ||
| const itemWord = count === 1 ? "item" : "items"; | ||
| const verb = count === 1 ? "was" : "were"; | ||
| const pronoun = count === 1 ? "it doesn't" : "they don't"; | ||
|
||
|
|
||
| let section = "\n\n> [!NOTE]\n"; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot keep details for NOTE
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated to keep the NOTE section collapsible with Screenshot: |
||
| section += `> <details>\n`; | ||
| section += `> <summary>🔒 Integrity filter blocked ${count} ${itemWord}</summary>\n`; | ||
| section += `>\n`; | ||
| section += `> The following ${itemWord} were blocked because they don't meet the GitHub integrity level.\n`; | ||
| section += `> The following ${itemWord} ${verb} blocked because ${pronoun} meet the GitHub integrity level.\n`; | ||
| section += `>\n`; | ||
|
|
||
| const maxItems = 16; | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -259,7 +259,7 @@ describe("gateway_difc_filtered.cjs", () => { | |||||
| const events = [{ type: "DIFC_FILTERED", tool_name: "tool", reason: "reason" }]; | ||||||
| const result = generateDifcFilteredSection(events); | ||||||
|
|
||||||
| expect(result).toContain("blocked because they don't meet"); | ||||||
| expect(result).toMatch(/blocked because (it doesn't|they don't) meet/); | ||||||
|
||||||
| expect(result).toMatch(/blocked because (it doesn't|they don't) meet/); | |
| expect(result).toContain("blocked because it doesn't meet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test title still says it "generate[s] details section", but the implementation no longer uses a
wrapper for the WARNING block. Update the test description to match the new behavior to avoid confusion when reading failures.
This issue also appears on line 319 of the same file.