Commit c726c3a
Add /create-issue command for failing-test triage (#15780)
* Extract Aspire.TestTools shared library
Move TrxReader from GenerateTestSummary into a new Aspire.TestTools
library and add GitHubCli and GitHubActionsApi wrappers with a
fixture-based testing layer that reads canned responses from disk
when ASPIRE_FAILING_TEST_ISSUE_FIXTURE_DIR is set. Register the
project in Aspire.slnx.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add CreateFailingTestIssue tool
New dotnet-run CLI tool that resolves a GitHub Actions run URL,
downloads TRX test-failure artifacts, parses failing tests, matches
them to source files, groups by test class, and generates per-class
issue bodies with structured metadata. Supports --create to file or
reopen GitHub issues and --force-new to always create fresh issues.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Refactor DownloadFailingJobLogs and GenerateTestSummary to use Aspire.TestTools
Replace the inline GitHubCli and TrxReader copies in
DownloadFailingJobLogs with references to the shared
Aspire.TestTools library. Update GenerateTestSummary to depend
on Aspire.TestTools for TrxReader.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Rename and update failing-test issue template
Rename 40_blocking_clean_ci.yml to 50_failing_test.yml and update
fields to match the structured metadata produced by the
CreateFailingTestIssue tool.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add /create-issue workflow for failing-test triage
GitHub Actions workflow triggered by /create-issue comment commands
on issues and PRs. Validates permissions (admin, maintain, or write),
resolves the CI run, and invokes the CreateFailingTestIssue tool.
Handles empty results gracefully with zero-byte JSON check.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add tests for failing-test tooling
18 fixture-driven tests covering run resolution, TRX parsing, issue
generation, existing-issue search and reopen, --force-new, PR URL
resolution fallback, and the /create-issue workflow JS logic. Also
adds tests for DownloadFailingJobLogs and GenerateTestSummary via
the shared fixture layer.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Update ci-test-failures skill docs and project metadata
Document the /create-issue workflow, CreateFailingTestIssue tool, and
fixture-based testing in the skill guide. Add diagnostics.log to
.gitignore and reference the new tool in AGENTS.md.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review feedback: use --output flag and CreateTempSubdirectory
- Use --output flag with explicit build step in workflow to avoid
stdout corruption from dotnet build noise
- Replace Path.Combine(Path.GetTempPath(), ...) with
Directory.CreateTempSubdirectory() in FailingTestIssueCommand
and TestTrxBuilder per repo conventions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Post comment on failure for all /create-issue error paths
- Change 'Create or update' step condition to run even when resolve
step fails (continue-on-error already set), so the tool's error
JSON is always surfaced as a PR comment
- Add catch-all 'Post failure comment on unexpected error' step that
fires on any unexpected failure (SDK restore, build crash, etc.)
and links to the workflow run
- Skip the catch-all when extract-command or verify-permission already
posted their own error comment to avoid duplicates
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Make error details collapsible when over 30 lines
Wrap the error details code block in a <details> element when the
content exceeds 30 lines to keep long failing-test issues readable.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* /create-issue: show failures on no-args, add /disable-test hint on success
When /create-issue is used without arguments on a PR, discover test
failures from the latest CI run and list them as copy-pasteable
commands. Usage help is shown below the list.
When /create-issue successfully creates, updates, or reopens a
failing-test issue, the success comment now includes a suggested
/disable-test command with the issue URL.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address PR feedback: process lifecycle, zip validation, indentation
- Terminate gh processes on cancellation to prevent orphaned OS processes
- Add 5-minute default timeout via linked CancellationTokenSource
- Observe stderrTask in catch block to prevent unobserved faulted tasks
- Validate zip entries for path traversal before extraction
- Fix extra indentation on ResolveWorkflowAsync
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Move permission check before command parsing; harden workflow
- Verify write access before extracting/reflecting user input (security)
- Move checkout after permission check to skip work for unauthorized users
- Add persist-credentials: false to checkout
- Add top-level permissions: {} to restrict defaults
- Add permission comments and job name (zizmor pedantic clean)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6002e23 commit c726c3a
File tree
30 files changed
+5548
-258
lines changed- .github
- ISSUE_TEMPLATE
- skills/ci-test-failures
- workflows
- tests/Infrastructure.Tests
- CreateFailingTestIssue
- DownloadFailingJobLogs
- GenerateTestSummary
- WorkflowScripts
- tools
- Aspire.TestTools
- CreateFailingTestIssue
- GenerateTestSummary
- scripts
30 files changed
+5548
-258
lines changedLines changed: 33 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments