Auto-assign Copilot to next- issues generated from weekly run, and add fix-pyright skill#46726
Auto-assign Copilot to next- issues generated from weekly run, and add fix-pyright skill#46726JennyPng wants to merge 19 commits intoAzure:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the eng/tools/azure-sdk-tools vnext issue automation to optionally auto-assign the Copilot coding agent for eligible next-* issues (with duplicate PR detection and version-bump retriggering), and adds a new fix-pyright skill to align with existing fix-* skills.
Changes:
- Add Copilot auto-fix helpers to vnext issue creation/update flow (labels, instruction block upsert, duplicate PR detection, GraphQL assignment, and optional force-reassign on version change).
- Add unit tests covering eligibility, duplicate PR detection, instruction generation, label reconciliation, and assignment flows.
- Add
fix-pyrightskill documentation and update engineering docs (including removing the outdated Ruff row).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/tools/azure-sdk-tools/tests/test_vnext_auto_fix.py | Adds tests for Copilot auto-fix helpers and integration behavior. |
| eng/tools/azure-sdk-tools/gh_tools/vnext_issue_creator.py | Implements Copilot auto-fix logic (instructions/labels/assignment) and updates some type signatures and mgmt labeling heuristic. |
| doc/eng_sys_checks.md | Documents the Copilot auto-fix behavior for weekly next-* checks. |
| doc/analyze_check_versions.md | Removes the Ruff row from the checker version table. |
| .github/skills/fix-pyright/SKILL.md | Introduces a new skill guide for fixing pyright issues, consistent with other fix-* skills. |
| end_idx = body.find(COPILOT_AUTOFIX_END) | ||
| if start_idx != -1 and end_idx != -1: | ||
| return body[:start_idx].rstrip() + instructions |
There was a problem hiding this comment.
i dont think we ever expect human authored content in the issue?
| try: | ||
| open_prs = repo.get_pulls(state="open", sort="created", direction="desc") | ||
| for pr in open_prs: | ||
| body = pr.body or "" | ||
| title = pr.title or "" | ||
| search_text = f"{title} {body}".lower() | ||
|
|
||
| # 1. PR explicitly references the issue number | ||
| issue_ref = f"#{issue_number}" | ||
| has_issue_ref = issue_ref in title or issue_ref in body |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| **Command:** | ||
| ```powershell | ||
| cd <package-path> | ||
| azpysdk --isolate pyright . |
There was a problem hiding this comment.
This assumes eng/tools/azure-sdk-tools is installed. We probably point to it in a skill that references this? if not, we need to repeat ourselves I think.
|
|
||
| **Command:** | ||
| ```powershell | ||
| cd <package-path> |
There was a problem hiding this comment.
| cd <package-path> | |
| cd <package-path> | |
| # install dev_requirements.txt |
| **If virtual environment is missing:** | ||
| Ask: "Do you have an existing virtual environment path, or should I create 'env'?" | ||
|
|
||
| ### Step 1: CRITICAL - Activate Virtual Environment FIRST |
There was a problem hiding this comment.
analyzeare run on python 3.10- We should mention this when deciding to re-use or active a venv.
| **IMMEDIATELY activate the virtual environment before ANY other command:** | ||
|
|
||
| ```powershell | ||
| # Activate the provided virtual environment (e.g., env, venv) |
There was a problem hiding this comment.
Real talk. agents are quite good at activating venvs. As long as you tell them activate a venv before all commands it should take care of it crossplat.
There was a problem hiding this comment.
Just make certain it knows what version of python to prep.
core:
misc.
tests: