Skip to content

FEAT: AI-powered issue triage with GitHub Models#477

Open
sumitmsft wants to merge 6 commits intomainfrom
sumitmsft/issue-auto-triage
Open

FEAT: AI-powered issue triage with GitHub Models#477
sumitmsft wants to merge 6 commits intomainfrom
sumitmsft/issue-auto-triage

Conversation

@sumitmsft
Copy link
Contributor

@sumitmsft sumitmsft commented Mar 17, 2026

Work Item / Issue Reference

AB#43191


Summary

Adds an automated GitHub Actions workflow that uses AI (GitHub Models - GPT-4.1) to classify and analyze new issues, then sends formatted notifications to a Teams channel.

Changes:

  • Add issue-triage.yml workflow — AI-powered issue classification and code-grounded analysis triggered on new issues or via manual dispatch
  • Add issue-notify.yml workflow — Formats triage results into rich HTML and posts to Teams via webhook
  • Add test-triage-local.js — Local test script that mirrors the workflow logic for development
  • Update .gitignore — Exclude triage test output files

Key capabilities:

  • Classifies issues into one of four categories: BUG, BREAK_FIX, FEATURE_REQUEST, or DISCUSSION
  • Fetches actual source files before AI analysis for code-grounded accuracy
  • For BUG/BREAK_FIX: provides verdict, root cause, evidence, recommended fixes, and code locations
  • For FEATURE_REQUEST/DISCUSSION: provides engineer guidance with technical assessment, implementation approach, effort estimate, and risks
  • Verdict labels: Confirmed Bug, Likely Bug, Require More Analysis, Not a Bug
  • Uses GitHub Models API (gpt-4.1) with GITHUB_TOKEN — no Azure secrets needed
  • Teams notifications with bold labels, structured sections, and proper HTML rendering
  • HTML escaping on all untrusted/user-supplied values to prevent markup injection

- Add code-grounded analysis: fetch source files before AI calls for accuracy
- Add engineer guidance for non-bug issues (FEATURE_REQUEST/DISCUSSION)
- Replace speculative code changes with evidence-based sections
- Add verdict labels (Confirmed Bug/Likely Bug/Require More Analysis/Not a Bug)
- Format Teams notifications with bold labels and proper HTML rendering
- Add local test script (test-triage-local.js) for development
- Update .gitignore for triage test output files
Copilot AI review requested due to automatic review settings March 17, 2026 19:41
@github-actions
Copy link

github-actions bot commented Mar 17, 2026

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

77%


📈 Total Lines Covered: 5664 out of 7335
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.logger_bridge.hpp: 58.8%
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 67.8%
mssql_python.pybind.ddbc_bindings.cpp: 69.7%
mssql_python.row.py: 70.5%
mssql_python.pybind.connection.connection.cpp: 75.3%
mssql_python.__init__.py: 77.1%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.connection.py: 85.2%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

Copy link
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

Adds automated issue triage + notification workflows that use GitHub Models to classify/analyze newly opened issues and post a formatted summary to a Teams channel, plus a local Node.js script to test the same flow end-to-end.

Changes:

  • Introduces an issue-triage workflow to classify issues, fetch relevant source files, and generate AI-driven analysis/guidance.
  • Introduces an issue-notify reusable workflow to send richly formatted Teams notifications.
  • Adds a local test-triage-local.js script and updates .gitignore for local output artifacts.

Reviewed changes

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

File Description
.github/workflows/issue-triage.yml New workflow to run AI classification + optional code-grounded analysis and pass results to a notifier workflow.
.github/workflows/issue-notify.yml New reusable workflow that formats triage outputs into an HTML message and posts it to Teams via webhook.
test-triage-local.js Local Node.js runner that mirrors the workflow logic for debugging triage and notification formatting.
.gitignore Ignores local triage output logs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added the pr-size: large Substantial code update label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: large Substantial code update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants