respond-to-issue

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Respond to GitHub Issue

回复GitHub Issue

Help a maintainer draft a high-quality response to a GitHub issue from an external contributor.
帮助维护者起草针对外部贡献者提出的GitHub问题的高质量回复。

Workflow

工作流程

1. Understand the issue

1. 理解问题

  • Fetch the issue using
    gh issue view <number> --repo NVIDIA/Megatron-LM --json title,body,comments,labels,state
    .
  • Read the title, body, and all existing comments to understand the full context.
  • Identify the type: bug report, feature request, question, or discussion.
  • 使用
    gh issue view <number> --repo NVIDIA/Megatron-LM --json title,body,comments,labels,state
    获取问题。
  • 阅读标题、正文和所有现有评论,了解完整背景。
  • 确定问题类型:错误报告、功能请求、疑问或讨论。

2. Research the codebase

2. 研究代码库

  • Based on what the issue is asking, search the Megatron-LM codebase for the relevant code.
  • Read the relevant source files to understand the current behavior.
  • If the issue references specific files or functions, read those directly.
  • Check
    git log --oneline -20 -- <relevant-files>
    to see if there have been recent changes that address or relate to the issue.
  • Use
    git log -S "<symbol>" --oneline
    to trace when code was added or removed — this is especially useful for questions about unused/deprecated code or missing features.
  • If the issue is about a bug, try to confirm whether the reported behavior matches the code.
  • Check whether an existing PR already addresses the issue:
    gh pr list --repo NVIDIA/Megatron-LM --search "<keywords>" --limit 5
    .
  • 根据问题内容,在Megatron-LM代码库中搜索相关代码。
  • 阅读相关源文件,了解当前行为。
  • 如果问题引用了特定文件或函数,直接阅读这些内容。
  • 查看
    git log --oneline -20 -- <relevant-files>
    ,了解是否有最近的变更解决或关联该问题。
  • 使用
    git log -S "<symbol>" --oneline
    追踪代码的添加或移除时间——这对于关于未使用/已弃用代码或缺失功能的疑问尤其有用。
  • 如果问题是关于错误的,尝试确认报告的行为是否与代码一致。
  • 检查是否已有现有PR解决该问题:
    gh pr list --repo NVIDIA/Megatron-LM --search "<keywords>" --limit 5

3. Verify before citing

3. 引用前验证

Before including specific details in the response, verify them:
  • If citing a commit hash, confirm the commit message and diff match what you're claiming (
    git show <hash> --stat
    ).
  • If citing a file path and line number, re-read the file to confirm the line content is correct.
  • If claiming code is unused or missing, do a thorough grep to make sure you haven't missed a reference.
在回复中包含具体细节之前,先进行验证:
  • 如果引用提交哈希值,确认提交信息和差异与你的说法一致(
    git show <hash> --stat
    )。
  • 如果引用文件路径和行号,重新阅读文件以确认行内容正确。
  • 如果声称代码未使用或缺失,进行彻底的grep搜索,确保没有遗漏引用。

4. Draft the response

4. 起草回复

Write a response that:
  • Is technically accurate and grounded in the actual code (cite file paths and line numbers where helpful).
  • Is respectful and welcoming to external contributors.
  • Directly addresses the question or concern raised.
  • If the contributor identified a real gap or bug, acknowledge it clearly.
  • If there's a workaround, mention it.
  • If work is planned or a fix would be welcome, say so and suggest next steps (e.g., "a PR to address this would be welcome").
  • Keeps the tone professional but friendly.
  • Is concise -- contributors appreciate direct answers, not walls of text.
撰写回复时需注意:
  • 技术准确,基于实际代码(必要时引用文件路径和行号)。
  • 对外部贡献者保持尊重和友好。
  • 直接回应提出的问题或关注点。
  • 如果贡献者指出了真实的漏洞或错误,明确予以认可。
  • 如果有解决方法,提及该方法。
  • 如果已有计划工作或欢迎修复,说明情况并建议后续步骤(例如:“欢迎提交PR解决此问题”)。
  • 保持专业但友好的语气。
  • 简洁明了——贡献者喜欢直接的答案,而非冗长的文本。

5. Suggest follow-up actions

5. 建议后续行动

If the issue identifies something cleanly actionable (dead code to remove, a small bug fix, a missing feature), tell the maintainer and offer to create a branch and PR to address it — don't just draft a comment.
如果问题明确指出了可执行的事项(如移除无用代码、修复小错误、添加缺失功能),告知维护者并主动提出创建分支和PR来解决问题——不要只起草评论。

6. Present to the maintainer

6. 提交给维护者审核

Show the drafted response to the user (the maintainer) for review. Do NOT post it to GitHub automatically. The maintainer will decide whether to post it, edit it, or ask for changes.
Format the draft as a quoted markdown block so it's easy to copy.
将起草好的回复展示给用户(维护者)审核。请勿自动发布到GitHub。维护者会决定是否发布、编辑或要求修改。
将草稿格式化为引用的markdown块,以便于复制。

Important guidelines

重要准则

  • Never post comments to GitHub without explicit approval from the user.
  • If you're unsure about the answer, say so clearly in your draft and flag the uncertainty for the maintainer.
  • If the issue is outside the scope of what you can determine from the code, tell the maintainer what you found and what remains unclear.
  • Check whether similar issues exist that might be relevant:
    gh issue list --repo NVIDIA/Megatron-LM --search "<keywords>" --limit 5
    .
  • 未经用户明确批准,切勿在GitHub上发布评论。
  • 如果对答案不确定,在草稿中明确说明,并向维护者标注该不确定性。
  • 如果问题超出了你能从代码中确定的范围,告知维护者你的发现以及仍不明确的部分。
  • 检查是否存在可能相关的类似问题:
    gh issue list --repo NVIDIA/Megatron-LM --search "<keywords>" --limit 5