Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions .github/workflows/issue-processing-ai-triage-nonblazor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Issue Triage with Copilot

# =============================================================================
# TRIGGER CONFIGURATION
# This workflow runs automatically when a new issue is opened in the repository
# =============================================================================
on:
issues:
types:
- opened

jobs:
triage-non-blazor-issue:
# ===========================================================================
# JOB FILTER CONDITION
# Only run this job for issues that:
# 1. Reference ASP.NET Core documentation (must contain aspnetcore/ path)
# 2. Are NOT related to Blazor content (excludes blazor/ folder)
# 3. Are NOT related to Blazor-adjacent content (excludes specific
# client-side interop and component tag helper docs that are
# Blazor-related but located outside the blazor/ folder)
# ===========================================================================
if: |
contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/')
&& !contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor')
&& !contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/client-side/dotnet-interop/index.md')
&& !contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/client-side/dotnet-interop/wasm-browser-app.md')
&& !contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/client-side/dotnet-on-webworkers.md')
&& !contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/mvc/views/tag-helpers/built-in/component-tag-helper.md')
&& !contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/mvc/views/tag-helpers/built-in/persist-component-state.md')
runs-on: ubuntu-latest

# ===========================================================================
# PERMISSIONS
# - issues: write - Required to post comments and add labels to issues
# - contents: read - Required to checkout the repository and read agent file
# - pull-requests: read - Required for Copilot action to access PR context that may be referred to in the issue.
# ===========================================================================
permissions:
issues: write
contents: read
pull-requests: read
steps:
# =========================================================================
# STEP 1: POST WELCOME MESSAGE
# Immediately acknowledge the issue with a friendly welcome message
# to let the submitter know their issue has been received
# =========================================================================
- name: Post welcome message
uses: actions/github-script@v6
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `### 👋 ***Thanks for your issue!*** 😊\n\nWe will be along shortly to assist.`
})

# =========================================================================
# STEP 2: CHECKOUT REPOSITORY
# Clone the repository to access the Copilot agent configuration file
# located at .github/agents/issue-triage-nonblazor.agent.md
# =========================================================================
- name: Checkout repository
uses: actions/checkout@v4

# =========================================================================
# STEP 3: RUN COPILOT AI TRIAGE
# Execute the Copilot action with the non-Blazor triage agent to:
# - Analyze the issue content
# - Generate a triage report with recommendations
# - Post the analysis as a comment on the issue
# =========================================================================
- name: Run Copilot Issue Triage
uses: github/copilot-action@v1
with:
agent: .github/agents/issue-triage-nonblazor.agent.md
prompt: |
Analyze issue #${{ github.event.issue.number }} and post your triage report as a comment on the issue.
Issue URL: ${{ github.event.issue.html_url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# =========================================================================
# STEP 4: ADD TRIAGE LABEL
# Apply the "ai-triage-action-plan" label to indicate this issue has been
# processed by the AI triage workflow and has an action plan generated
# =========================================================================
- name: Add triage label
uses: actions/github-script@v6
with:
script: |
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["ai-triage-action-plan"]
})
Loading