Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Instruct LLM to use pull request template when creating PRs#1442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
almaleksia merged 2 commits intomainfromalmaleksia/use-pr-template
Nov 19, 2025

Conversation

@almaleksia
Copy link
Contributor

Adds server instructions that tell LLM to search for PR templates and use them for creating PRs.

xref#1076

CopilotAI review requested due to automatic review settingsNovember 19, 2025 10:24
@almaleksiaalmaleksia requested a review froma team as acode ownerNovember 19, 2025 10:24
Copilot finished reviewing on behalf ofalmaleksiaNovember 19, 2025 10:26
Copy link
Contributor

CopilotAI 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

This PR enhances the GitHub MCP Server by instructing LLMs to search for and use pull request templates when creating PRs. The instruction is conditionally added only when both the "pull_requests" and "repos" toolsets are enabled, ensuring the LLM has access to the necessary file retrieval tools.

Key Changes

  • ModifiedgetToolsetInstructions() to accept anenabledToolsets parameter for conditional instruction generation
  • Added new instruction text for pull request template discovery and usage when repos toolset is available
  • Enhanced test coverage with assertions to verify the conditional template instruction behavior

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
pkg/github/instructions.goUpdated function signature to accept enabled toolsets; added conditional logic to include PR template instructions when repos toolset is available
pkg/github/instructions_test.goAddedstrings import; expanded test structure with fields for conditional assertions; added test cases to verify template instructions appear/disappear based on enabled toolsets
Comments suppressed due to low confidence (1)

pkg/github/instructions_test.go:161

  • The test cases for "issues", "discussions", and "nonexistent" toolsets are missing theenabledToolsets field. SincegetToolsetInstructions now requires this parameter, these test cases should provide it (even if it's justnil or an empty slice[]string{}) to be explicit about the expected behavior and avoid potential issues if the function logic changes to use this parameter for these toolsets.
{toolset:       "issues",expectedEmpty: false,},{toolset:       "discussions",expectedEmpty: false,},{toolset:       "nonexistent",expectedEmpty: true,},

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@tonytrgtonytrgtonytrg approved these changes

@JoannaaKLJoannaaKLJoannaaKL approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@almaleksia@tonytrg@JoannaaKL

[8]ページ先頭

©2009-2025 Movatter.jp