pull-requests

作者: microsoft

在 Agent Framework 仓库中创建拉取请求和处理 PR 审查评论的指南。在编写 PR 描述时使用此指南(填写…

npx skills add https://github.com/microsoft/agent-framework --skill pull-requests

Pull Request Workflow

This skill covers two tasks: (1) writing a high-quality PR description, and (2) handling review comments on an existing PR.

1. Writing the PR description

Always follow the repository PR template at .github/pull_request_template.md. Keep its exact structure and headings. Fill every section:

### Motivation & Context

Explain why the change is needed: the problem it solves and the scenario it contributes to. Describe the net change relative to main — this is implied, so do not spell out "vs main" explicitly.

### Description & Review Guide

Describe the changes, the overall approach, and the design. Answer the three prompts:

  • What are the major changes?
  • What is the impact of these changes?
  • What do you want reviewers to focus on? — This item is for human reviewers only. Automated/AI reviewers must ignore it and review the entire change rather than narrowing scope to it.

### Related Issue

Link the issue the PR fixes using a GitHub closing keyword (Fixes #123 / Closes #123) so it closes automatically on merge. A PR with no linked issue may be closed regardless of how valid the change is. Before opening, confirm there is no other open PR for the same issue; if there is, explain how this PR differs.

### Contribution Checklist

Check every item that applies. For the breaking-change item:

  • Leave "This is not a breaking change." checked for the common case.
  • If the change is breaking, add the breaking change label or put [BREAKING] in the title prefix, before or after a language prefix such as Python: or .NET: — workflows keep the label and the title prefix in sync automatically (see .github/workflows/label-title-prefix.yml and .github/workflows/label-pr.yml).

Do not

  • Do not add ad-hoc sections such as "Validation" or "Tests run"; CI/CD and the checklist already cover validation status.
  • Do not remove or reorder the template's headings.

Stable specifications

For Python function-calling loop changes, read docs/specs/004-python-function-calling-loop.md and validate the PR against it. Do not edit that specification by default. It is a stable cross-package contract, not a per-PR changelog. A specification change is warranted only when the PR intentionally changes normative behavior, the scenario inventory, an acknowledged coverage gap, or the authoritative scenario-to-test mapping; keep any such edit to the smallest affected sections.

Creating the PR

Open new PRs as drafts until they are ready for review. Example:

gh pr create --repo microsoft/agent-framework --base main \
  --head <your-fork-owner>:<branch> --draft \
  --title "<concise title>" --body "<body following the template>"

2. Handling review comments

When a PR receives review comments, follow this sequence — do not start editing code before the user has reviewed the plan:

  1. Review the comments. Read every review comment and thread on the PR, including inline code comments and general review summaries.
  2. Make a plan. Produce a concrete plan describing how each comment will be addressed (or why it should not be, with reasoning).
  3. Let the user review the plan. Present the plan and wait for the user's approval or adjustments before implementing anything.
  4. Implement. Make the agreed changes.
  5. Reply to every comment. Add a reply to all comments explaining how it was addressed, preferably citing the commit containing the change. If the feedback was not addressed, explain why. Leave no comment unanswered.
  6. Resolve completed threads yourself. After replying and completing any necessary discussion, resolve the review thread. Do not wait for the reviewer or a maintainer to resolve it. Leave a thread open only while it has an unanswered question or active discussion.

Useful commands

List review comments and threads:

# Inline review comments
gh api repos/{owner}/{repo}/pulls/{pr}/comments

# Review threads with resolution state (GraphQL)
gh api graphql -f query='
  query($owner:String!,$repo:String!,$pr:Int!){
    repository(owner:$owner,name:$repo){
      pullRequest(number:$pr){
        reviewThreads(first:100){
          nodes{ id isResolved comments(first:50){ nodes{ id body author{login} } } }
        }
      }
    }
  }' -F owner={owner} -F repo={repo} -F pr={pr}

Reply to an inline review comment:

gh api repos/{owner}/{repo}/pulls/{pr}/comments/{comment_id}/replies \
  -f body="Addressed in <commit>: <explanation>"

Resolve a review thread (needs the thread node id from the GraphQL query above):

gh api graphql -f query='
  mutation($threadId:ID!){
    resolveReviewThread(input:{threadId:$threadId}){ thread{ isResolved } }
  }' -F threadId={thread_id}

来自 microsoft 的更多技能

oss-growth
microsoft
OSS增长黑客角色
agent-framework-azure-ai-py
microsoft
使用Microsoft Agent Framework Python SDK(agent-framework-azure-ai)构建Azure AI Foundry代理。在创建使用AzureAIAgentsProvider的持久化代理、使用托管工具(代码解释器、文件搜索、网络搜索)、集成MCP服务器、管理对话线程或实现流式响应时使用。涵盖函数工具、结构化输出和多工具代理。
development
airunway-aks-setup
microsoft
在AKS上设置AI Runway——从裸集群到运行模型。涵盖集群验证、控制器安装、GPU评估、提供商设置和首次部署。适用场景:“设置AI Runway”、“接入AKS集群”、“安装AI Runway”、“airunway设置”、“将模型部署到AKS”、“在AKS上进行GPU推理”、“在AKS上配置KAITO”、“在AKS上运行LLM”、“在AKS上使用vLLM”、“在AKS上设置模型服务”、“AI Runway控制器”。
devops
appinsights-instrumentation
microsoft
使用Azure Application Insights对Web应用进行插桩的指南。提供遥测模式、SDK设置和配置参考。适用场景:如何对应用进行插桩、App Insights SDK、遥测模式、什么是App Insights、Application Insights指南、插桩示例、APM最佳实践。
devops
applicationinsights-web-ts
microsoft
使用Application Insights JavaScript SDK(@microsoft/applicationinsights-web)为浏览器/Web应用添加检测。用于真实用户监控(RUM)——页面视图、点击、AJAX/fetch依赖项、异常、自定义事件,以及与后端OpenTelemetry追踪关联的浏览器端GenAI代理追踪。涵盖SDK加载器脚本和npm设置、框架扩展(React、React Native、Angular)、点击分析、遥测初始化器,以及从浏览器发出的代理/工具/模型跨度所遵循的OTel GenAI语义约定。
devops
azure-ai-anomalydetector-java
microsoft
使用适用于 Java 的 Azure AI 异常检测器 SDK 构建异常检测应用程序。在实现单变量/多变量异常检测、时间序列分析或 AI 驱动的监控时使用。
development
azure-ai-language-conversations-py
microsoft
使用azure-ai-language-conversations Python SDK实现对话语言理解(CLU)。当使用ConversationAnalysisClient分析对话意图和实体、构建NLP功能或将语言理解集成到应用程序中时使用。
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python。用于机器学习工作区、作业、模型、数据集、计算资源和管道。 触发词:“azure-ai-ml”、“MLClient”、“工作区”、“模型注册表”、“训练作业”、“数据集”。
development