Skip to content

Conversation

Copy link

Copilot AI commented Aug 26, 2025

This PR enhances the GitHub MCP Server's issue creation functionality by implementing comprehensive title validation to ensure issues have meaningful, substantive titles rather than placeholder text.

Problem

The existing validation only checked for empty titles, allowing users to create issues with placeholder text like "Title", "TODO", or meaningless content like "!!!" or "Hi". This led to low-quality issues that don't provide clear information about the problem or request.

Solution

Added a new RequiredMeaningfulTitle validation function that enforces:

  • Minimum length: Titles must be at least 3 characters long
  • Content validation: Must contain at least one letter or number (not just special characters)
  • Placeholder detection: Rejects common placeholder patterns like "title", "todo", "test", "untitled", etc. (case-insensitive)

Example

// Before: These would all pass validation
"" // ❌ Empty (already caught)
"Hi" // ❌ Now caught: too short
"!!!" // ❌ Now caught: no alphanumeric characters
"Title" // ❌ Now caught: placeholder text
"TODO" // ❌ Now caught: placeholder text

// After: Only meaningful titles pass
"Fix authentication bug" // ✅ Valid
"Add user dashboard" // ✅ Valid
"Bug in login system" // ✅ Valid

Changes

  • Added RequiredMeaningfulTitle function in pkg/github/server.go
  • Updated CreateIssue to use the enhanced validation
  • Added comprehensive test coverage for all validation scenarios
  • Updated README documentation to reflect the new requirements
  • Maintained backward compatibility for all legitimate titles

The validation provides helpful, specific error messages for each failure case, guiding users to create better titles.

Fixes github#3.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Author

Copilot AI commented Aug 26, 2025

@JaclynCodes 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@JaclynCodes JaclynCodes marked this pull request as ready for review August 26, 2025 17:46
Copilot AI review requested due to automatic review settings August 26, 2025 17:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@JaclynCodes JaclynCodes merged commit 925c4c2 into main Aug 26, 2025
11 of 16 checks passed
@JaclynCodes JaclynCodes deleted the copilot/fix-3 branch August 26, 2025 17:48
Copilot AI restored the copilot/fix-3 branch August 26, 2025 17:51
Copilot AI changed the title [WIP] Add a title? Make it real Add meaningful title validation for issue creation Aug 26, 2025
Copilot AI requested a review from JaclynCodes August 26, 2025 17:58
Copilot finished work on behalf of JaclynCodes August 26, 2025 17:58
Copy link
Owner

@JaclynCodes JaclynCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@JaclynCodes
Copy link
Owner

Copilot wasn't able to review any files in this pull request.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@JaclynCodes JaclynCodes self-requested a review August 30, 2025 22:26
Copy link
Owner

@JaclynCodes JaclynCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants