Skip to content

Add ci-analysis skill and GitHub Actions workflow skill - #37950

Merged
AndriySvyryd merged 13 commits into
mainfrom
copilot/port-ci-analysis-skill
Mar 19, 2026
Merged

AndriySvyryd merged 13 commits into
mainfrom
copilot/port-ci-analysis-skill

Conversation

Copilot AI commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

Ports the ci-analysis agent skill from dotnet/aspnetcore/.github/skills/ci-analysis into .agents/skills/ci-analysis, and adds a new make-github-actions-workflow skill.

ci-analysis skill

This skill enables Copilot agents to analyze Azure DevOps and Helix CI failures on PRs — investigating build errors, correlating failures with PR changes, checking for known issues, and providing actionable recommendations.

  • SKILL.md — Skill definition, analysis workflow, interpretation guidance, and recommendation logic
  • scripts/Get-CIStatus.ps1 — PowerShell script that queries AzDO timelines, Helix work items, Build Analysis known issues, and PR file correlation
  • references/ — 8 reference docs covering binlog comparison, build progression analysis, Helix artifacts, Azure CLI fallback, subagent delegation patterns, SQL tracking, and manual investigation steps

Adapted for efcore:

  • All references to aspnetcore replaced with efcore across all files (script defaults, examples, docs, pipeline names, SQL schemas, etc.)
  • Default -Repository parameter changed to dotnet/efcore
  • Build definition ID set to 17 for efcore-ci
  • $script:Repository initialized after param() so nested functions can access it
  • Fixed if ($helixTasks) / else brace structure — removed extra closing brace and corrected indentation so the Helix URL extraction code is properly inside if ($logContent)
  • Added optional -HelixAccessToken parameter for authenticated access to internal Helix jobs (dnceng/internal), with a Get-HelixApiUrl helper that appends access_token to all Helix API URLs. Token is never logged to console output.

make-github-actions-workflow skill

New skill (.agents/skills/make-github-actions-workflow/SKILL.md) that guides Copilot agents in creating GitHub Actions workflows following this repository's conventions:

  • Trigger event selection, permission model, scripting patterns (actions/github-script@v8)
  • Common code patterns (PR commenting, permission checks, SHA-tag deduplication, reading repo files at a commit)
  • Security warning for pull_request_target workflows
  • References to all existing workflows in the repo

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Ports the ci-analysis agent skill into EF Core’s .agents/skills/ci-analysis, enabling Copilot agents (and humans) to triage Azure DevOps + Helix CI failures and produce structured summaries for follow-up investigation.

Changes:

  • Added the ci-analysis skill definition (SKILL.md) with a recommended workflow and interpretation guidance.
  • Added scripts/Get-CIStatus.ps1 to query AzDO timelines, Helix work items/logs, and emit a [CI_ANALYSIS_SUMMARY] JSON block.
  • Added reference documentation covering binlog comparison, build progression, Helix artifacts, Azure CLI fallback, SQL tracking, and delegation patterns.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.agents/skills/ci-analysis/SKILL.md Defines when/how to use the skill and how to interpret results.
.agents/skills/ci-analysis/scripts/Get-CIStatus.ps1 Implements AzDO/Helix querying, log parsing, caching, correlation, and summary emission.
.agents/skills/ci-analysis/references/azdo-helix-reference.md Quick reference for AzDO/Helix concepts, org/project defaults, and links.
.agents/skills/ci-analysis/references/azure-cli.md Azure CLI fallback guidance for deeper CI investigations.
.agents/skills/ci-analysis/references/binlog-comparison.md Playbook for comparing passing vs failing MSBuild binlogs.
.agents/skills/ci-analysis/references/build-progression-analysis.md Pattern for multi-build progression analysis (PR history).
.agents/skills/ci-analysis/references/delegation-patterns.md Guidance for delegating mechanical CI data-gathering to subagents.
.agents/skills/ci-analysis/references/helix-artifacts.md Guide to finding/downloading/understanding Helix work item artifacts.
.agents/skills/ci-analysis/references/manual-investigation.md Manual fallback steps when automation doesn’t surface enough detail.
.agents/skills/ci-analysis/references/sql-tracking.md SQL schemas/queries for tracking failures and investigation state.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

@AndriySvyryd AndriySvyryd left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment thread .agents/skills/ci-analysis/SKILL.md Resolved
Comment thread .agents/skills/ci-analysis/SKILL.md Resolved
Comment thread .agents/skills/ci-analysis/SKILL.md Resolved
Comment thread .agents/skills/ci-analysis/SKILL.md Resolved
Comment thread .agents/skills/ci-analysis/SKILL.md Resolved
Comment thread .agents/skills/ci-analysis/SKILL.md Resolved

Copilot AI commented Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Create a skill for creating GitHub Actions workflows. Research at https://docs.github.com/en/actions/concepts/workflows-and-actions/workflows?learn=getting_started and https://docs.github.com...

Created both in 0f5362b:

Skill: .agents/skills/make-github-actions-workflow/SKILL.md — covers repo conventions (permissions model, actions/github-script@v8, trigger event selection), a step-by-step workflow, common patterns (commenting on PRs, permission checks, SHA-tag deduplication, reading repo files at a commit), and references to all existing workflows.

Workflow: .github/workflows/copilot-ci-notify.yml — triggers on check_suite: completed (skips GitHub Actions suites to avoid self-triggering). For each associated PR it: verifies the author is copilot and the PR is non-draft, waits until all external check suites complete, identifies failed checks (excluding the aggregate efcore-ci), enforces a configurable MAX_COMMENTS limit (default 3) and per-SHA deduplication via hidden HTML comment tags, then posts @copilot investigate CI failures with the specific check name appended when exactly one non-aggregate check failed.

Copilot AI changed the title Port ci-analysis skill from dotnet/aspnetcore Port ci-analysis skill, add GitHub Actions workflow skill and copilot CI notify workflow Mar 18, 2026
Copilot AI requested a review from AndriySvyryd March 18, 2026 06:25
@AndriySvyryd AndriySvyryd changed the title Port ci-analysis skill, add GitHub Actions workflow skill and copilot CI notify workflow Add ci-analysis skill, GitHub Actions workflow skill and copilot CI notify workflow Mar 18, 2026
Comment thread .github/workflows/copilot-ci-notify.yml Resolved
Copilot AI changed the title Add ci-analysis skill, GitHub Actions workflow skill and copilot CI notify workflow Add ci-analysis skill and GitHub Actions workflow skill Mar 18, 2026
Copilot AI requested a review from AndriySvyryd March 18, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds two new Copilot agent skills under .agents/skills/: one for analyzing Azure DevOps/Helix CI failures on PRs, and one for authoring GitHub Actions workflows following this repo’s conventions.

Changes:

  • Ported the ci-analysis skill, including a PowerShell script (Get-CIStatus.ps1) and supporting investigation references.
  • Added a make-github-actions-workflow skill describing this repo’s GitHub Actions patterns (permissions, triggers, github-script usage).
  • Added multiple reference docs to guide deeper CI investigation workflows (binlog comparison, build progression, Helix artifacts, etc.).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.agents/skills/make-github-actions-workflow/SKILL.md New skill documenting repo conventions for creating GitHub Actions workflows.
.agents/skills/ci-analysis/SKILL.md New skill defining the CI analysis workflow and interpretation guidance for AzDO/Helix failures.
.agents/skills/ci-analysis/scripts/Get-CIStatus.ps1 New script to query AzDO timelines, Helix work items/logs, and emit a structured CI summary for agent reasoning.
.agents/skills/ci-analysis/references/sql-tracking.md Reference for tracking CI investigation facts using SQL tables/queries.
.agents/skills/ci-analysis/references/manual-investigation.md Manual fallback steps when script output isn’t sufficient.
.agents/skills/ci-analysis/references/helix-artifacts.md Guidance on finding and interpreting Helix artifacts (binlogs, console logs, test results).
.agents/skills/ci-analysis/references/delegation-patterns.md Patterns for delegating repetitive CI data gathering to subagents.
.agents/skills/ci-analysis/references/build-progression-analysis.md Reference for analyzing CI behavior across multiple PR builds and baselines.
.agents/skills/ci-analysis/references/binlog-comparison.md Reference for comparing binlogs between passing and failing runs to isolate MSBuild differences.
.agents/skills/ci-analysis/references/azure-cli.md Azure CLI fallback reference for AzDO investigation and artifact access.
.agents/skills/ci-analysis/references/azdo-helix-reference.md Quick reference for AzDO/Helix concepts, repo/pipeline examples, and known-issue search patterns.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +61 to +72
### Step 2: Choose the Trigger Event

| Use case | Event | Notes |
|----------|-------|-------|
| PR opened/updated | `pull_request` | Read-only access to PR |
| PR with write access | `pull_request_target` | Can comment, label, close |
| PR merged | `pull_request_target: [closed]` | Check `github.event.pull_request.merged == true` |
| CI checks complete | `check_suite: [completed]` | Filter `app.slug != 'github-actions'` to skip self |
| Code pushed | `push` | Filter by branches/paths |
| Manual trigger | `workflow_dispatch` | Add `inputs:` for parameters |
| Scheduled | `schedule` | Use cron syntax |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot Several Markdown tables in this skill use a leading double-pipe (|| ... | ... |) syntax (e.g., the trigger-event table). This renders as an extra empty first column in GitHub Markdown and is inconsistent with other skills in this repo (which use standard | col | col | tables). Please switch these to standard Markdown table syntax so they render correctly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I checked both SKILL.md files at commit 01a4e2f and the current HEAD — no double-pipe (||) table syntax was found. All tables use standard | col | col | Markdown syntax. This may have been a false positive from the automated reviewer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Tables already use standard | col | col | syntax — verified with grep at both commit 01a4e2f and current HEAD. No double-pipe patterns found.

Comment thread .agents/skills/ci-analysis/SKILL.md Resolved
@roji roji assigned AndriySvyryd and unassigned roji Mar 18, 2026
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Comment on lines +61 to +72
### Step 2: Choose the Trigger Event

| Use case | Event | Notes |
|----------|-------|-------|
| PR opened/updated | `pull_request` | Read-only access to PR |
| PR with write access | `pull_request_target` | Can comment, label, close |
| PR merged | `pull_request_target: [closed]` | Check `github.event.pull_request.merged == true` |
| CI checks complete | `check_suite: [completed]` | Filter `app.slug != 'github-actions'` to skip self |
| Code pushed | `push` | Filter by branches/paths |
| Manual trigger | `workflow_dispatch` | Add `inputs:` for parameters |
| Scheduled | `schedule` | Use cron syntax |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot Several Markdown tables in this skill use a leading double-pipe (|| ... | ... |) syntax (e.g., the trigger-event table). This renders as an extra empty first column in GitHub Markdown and is inconsistent with other skills in this repo (which use standard | col | col | tables). Please switch these to standard Markdown table syntax so they render correctly.

Copilot AI and others added 2 commits March 18, 2026 18:25
…oken parameter, init $script:Repository, remove azdo-helix sections

Co-authored-by: AndriySvyryd <[email protected]>
Comment thread .agents/skills/ci-analysis/SKILL.md Resolved
Copilot AI requested a review from AndriySvyryd March 18, 2026 23:10
@AndriySvyryd
AndriySvyryd enabled auto-merge (squash) March 18, 2026 23:39
@AndriySvyryd AndriySvyryd removed their assignment Mar 19, 2026
@AndriySvyryd
AndriySvyryd merged commit b2174cf into main Mar 19, 2026
10 checks passed
@AndriySvyryd
AndriySvyryd deleted the copilot/port-ci-analysis-skill branch March 19, 2026 01:20
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.

4 participants