microsoft / microsoft/vscode-pull-request-github
Assign MCPs & Tools to Copilot
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.6k
- Fork
- 796
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 46
Mô tả
Goal
I would like to be able to assign tools to Copilot when it is generating a PR title/description. It would be useful to allow it to access the Atlassian MCP and research the issue that I am working on, for example.
I could not find an issue related to this — please let me know if I missed it.
My Attempt
I've been able to assign a prompt as follows:
-
Create a prompt at
.github/prompts/pull-request-instructions.prompt.md:--- mode: agent tools: ['getJiraIssue', 'searchJiraIssuesUsingJql'] --- When creating a pull request, please follow these guidelines to ensure clarity and consistency: 1. **Issue Research (First Step):** - Before writing the title and description, check your branch name for an issue key and use the Atlassian MCP to research the Jira issue details if applicable. - Extract the issue key from your branch name (e.g., 'DEV-1234' from 'bf/mitch/DEV-1234-something-something'). - Use `mcp_atlassian_atl_searchJiraIssuesUsingJql` or `mcp_atlassian_atl_getJiraIssue` with the extracted issue key to get the full issue context. - Review the issue summary, description, acceptance criteria, and any comments to understand the problem thoroughly. - This ensures your pull request accurately reflects the issue requirements and provides proper context. 2. **Pull Request Title:** - If your branch name includes an issue key (e.g., 'DEV-1234'), start the title with this key in square brackets, followed by a space. For example: `[DEV-1234] Add User Authentication Feature`. - Use the issue summary from Jira as inspiration, but make it concise and specific to the changes made. - Use Title Case for the main title, capitalizing the first letter of each major word. - Keep the title descriptive of the actual solution implemented, not just the problem. 3. **Pull Request Description:** - Begin the description with the issue key on its own line, formatted as `[DEV-1234]`. - Include a brief problem statement based on the Jira issue description - what was wrong or what needed to be addressed. - Reference the original issue's expected behavior or acceptance criteria where relevant. - Use bullet points to list the specific fixes or changes made in the pull request. This helps reviewers quickly understand the scope of your changes. - If the issue had multiple parts, address each part clearly. - Ensure that your description is clear and provides enough context for reviewers to understand the purpose and impact of your changes. -
Add the prompt to the instructions in
.vscode/settings.json:"github.copilot.chat.pullRequestDescriptionGeneration.instructions": [ {"file": ".github/prompts/pull-request-instructions.prompt.md"} ] -
Run the tool in GitHub Pull Requests UI when making a new PR.
However, it is obviously not using the MCP when I observe the emitted PR title & description. When checking the debug logs, it is showing that the prompt is not being parsed, but is copied verbatim into the custom instructions:
Thanks
I appreciate any help with this, whether I am doing something wrong, or just some closure that what I am doing is not currently possible. This would be a very helpful feature!
Thank you!
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với prompt trong .github/prompts/pull-request-instructions.prompt.md và mục tương ứng trong .vscode/settings.json, sau đó tái hiện hành vi của GitHub Pull Requests UI trong khi xem xét các debug log. Hoàn thành khi việc tạo tiêu đề và mô tả pull request có thể sử dụng các MCP tools được chỉ định, hoặc issue ghi rõ rằng tính năng này không được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github, typescript, vscode
- Lĩnh vực
- ai, developer-experience, tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100